Fix: number of guesses

This commit is contained in:
Grail Finder
2025-06-29 09:18:52 +03:00
parent 41124c51fa
commit 5b666e042a
7 changed files with 65 additions and 25 deletions

View File

@ -83,7 +83,6 @@ type Room struct {
OpenedThisTurn uint8 // how many cards have been opened this turn
WCMap map[string]WordColor
BotMap map[string]BotPlayer // key is bot name
Result uint8 // 0 for unknown; 1 is win for red; 2 if for blue;
BlueCounter uint8
RedCounter uint8
RedTurn bool // false is blue turn
@ -97,8 +96,7 @@ type Room struct {
//
Mark CardMark // card is marked
// needed for debug
LogJournal []string
LastActionTS time.Time
LogJournal []string
}
func (r *Room) RemovePlayer(username string) {
@ -240,9 +238,9 @@ func (r *Room) WhichBotToMove() string {
func (r *Room) GetOppositeTeamColor() UserTeam {
switch r.TeamTurn {
case "red":
case UserTeamRed:
return UserTeamBlue
case "blue":
case UserTeamBlue:
return UserTeamRed
}
return UserTeamNone