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

@ -269,7 +269,11 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) {
fi.Room.ActionHistory = append(fi.Room.ActionHistory, action)
fi.Room.MimeDone = true
fi.Room.ThisTurnLimit = uint8(guessLimitU64) + 1
log.Debug("given clue", "clue", clue, "limit", guessLimitU64)
if guessLimitU64 == 0 {
fi.Room.ThisTurnLimit = 9
}
fi.Room.OpenedThisTurn = 0
log.Debug("given clue", "clue", clue, "limit", fi.Room.ThisTurnLimit)
notify(models.NotifyBacklogPrefix+fi.Room.ID, clue+num)
notifyBotIfNeeded(fi)
if err := saveFullInfo(fi); err != nil {