why do cuffs not work
This commit is contained in:
parent
11eff6b755
commit
76195d21cb
@ -11,6 +11,7 @@ package game
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"log/slog"
|
||||||
|
|
||||||
"git.sunturtle.xyz/studio/shotgun/player"
|
"git.sunturtle.xyz/studio/shotgun/player"
|
||||||
"git.sunturtle.xyz/studio/shotgun/serve"
|
"git.sunturtle.xyz/studio/shotgun/serve"
|
||||||
@ -94,6 +95,7 @@ func (g *Match) NextTurn() {
|
|||||||
g.reveal = false
|
g.reveal = false
|
||||||
cur := g.CurrentPlayer()
|
cur := g.CurrentPlayer()
|
||||||
skip := cur.cuffs == CuffedSkip
|
skip := cur.cuffs == CuffedSkip
|
||||||
|
slog.Info("next turn", "skip", skip, "cuffs", cur.cuffs)
|
||||||
cur.cuffs = cur.cuffs.NextState()
|
cur.cuffs = cur.cuffs.NextState()
|
||||||
if skip {
|
if skip {
|
||||||
g.NextTurn()
|
g.NextTurn()
|
||||||
|
@ -56,6 +56,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (c CuffState) NextState() CuffState {
|
func (c CuffState) NextState() CuffState {
|
||||||
var m = [...]CuffState{Uncuffed, Uncuffed, Cuffed}
|
if c != Uncuffed {
|
||||||
return m[c]
|
c--
|
||||||
|
}
|
||||||
|
return c
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user