Enha: simplier guesser prompt; player team-role recovery

This commit is contained in:
Grail Finder
2025-06-23 07:48:13 +03:00
parent 07c4d9295d
commit 23cbde0f7a
9 changed files with 188 additions and 65 deletions

View File

@ -31,6 +31,8 @@ func init() {
// bot loader
// check the rooms if it has bot_{digits} in them, create bots if have
recoverBots()
// if player has a roomID, but no team and role, try to recover
recoverPlayers()
}
func HandlePing(w http.ResponseWriter, r *http.Request) {
@ -85,7 +87,7 @@ func HandleExit(w http.ResponseWriter, r *http.Request) {
abortWithError(w, err.Error())
return
}
if len(exitedRoom.PlayerList) == 0 || creatorLeft {
if creatorLeft {
removeRoom(exitedRoom.ID)
// TODO: notify users if creator left
// and throw them away