feat: online player tracking and count display in lobby

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 15:33:19 +09:00
parent 5c5070502a
commit ef9a713696
2 changed files with 52 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ type lobbyState struct {
roomName string
joining bool
codeInput string
online int
}
type roomInfo struct {
@@ -39,7 +40,7 @@ func renderLobby(state lobbyState, width, height int) string {
Border(lipgloss.RoundedBorder()).
Padding(0, 1)
header := headerStyle.Render("── Lobby ──")
header := headerStyle.Render(fmt.Sprintf("── Lobby ── %d online ──", state.online))
menu := "[C] Create Room [J] Join by Code [Up/Down] Select [Enter] Join [Q] Back"
roomList := ""