fix: set room status to Playing when game starts

This commit is contained in:
2026-03-24 10:40:04 +09:00
parent 4db3ba1fc5
commit b6c28ddd80
3 changed files with 28 additions and 0 deletions

View File

@@ -78,6 +78,14 @@ func (l *Lobby) ListRooms() []*LobbyRoom {
return result
}
func (l *Lobby) StartRoom(code string) {
l.mu.Lock()
defer l.mu.Unlock()
if room, ok := l.rooms[code]; ok {
room.Status = RoomPlaying
}
}
func (l *Lobby) RemoveRoom(code string) {
l.mu.Lock()
defer l.mu.Unlock()