Chore: solved some todos

This commit is contained in:
Grail Finder
2025-06-12 07:04:20 +03:00
parent 6934b724ae
commit 74b10b8395
10 changed files with 50 additions and 82 deletions

View File

@ -135,11 +135,14 @@ func HandleStartGame(w http.ResponseWriter, r *http.Request) {
abortWithError(w, err.Error())
return
}
// TODO: check if enough players; also button should be hidden if already running
// check if enough players
if err := fi.Room.CanStart(); err != nil {
abortWithError(w, err.Error())
return
}
fi.Room.IsRunning = true
fi.Room.IsOver = false
fi.Room.TeamTurn = "blue"
// fi.Room.LoadTestCards()
loadCards(fi.Room)
fi.Room.UpdateCounter()
fi.Room.TeamWon = ""