why do cuffs not work

This commit is contained in:
Branden J Brown 2024-02-03 13:36:06 -06:00
parent 11eff6b755
commit 76195d21cb
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,7 @@ package game
import (
"errors"
"log/slog"
"git.sunturtle.xyz/studio/shotgun/player"
"git.sunturtle.xyz/studio/shotgun/serve"
@ -94,6 +95,7 @@ func (g *Match) NextTurn() {
g.reveal = false
cur := g.CurrentPlayer()
skip := cur.cuffs == CuffedSkip
slog.Info("next turn", "skip", skip, "cuffs", cur.cuffs)
cur.cuffs = cur.cuffs.NextState()
if skip {
g.NextTurn()

View File

@ -56,6 +56,8 @@ const (
)
func (c CuffState) NextState() CuffState {
var m = [...]CuffState{Uncuffed, Uncuffed, Cuffed}
return m[c]
if c != Uncuffed {
c--
}
return c
}