diff --git a/game/game.go b/game/game.go index fa9229c..8f90495 100644 --- a/game/game.go +++ b/game/game.go @@ -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() diff --git a/game/player.go b/game/player.go index cd0a4a7..e98e42f 100644 --- a/game/player.go +++ b/game/player.go @@ -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 }