why do cuffs not work
This commit is contained in:
parent
11eff6b755
commit
76195d21cb
@ -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()
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user