aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-10-18 13:12:41 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-10-18 13:12:41 +0200
commitce0392cbe4d84b0fb78179686efa770c695cc5e9 (patch)
tree74a4a2e2710bdc3ce9677c4354058e47dccdd86b /go/game/state.go
parent2c2a2d84a92cda814e0e56d9408e6cbfd68c4fbb (diff)
downloadmuhqs-game-ce0392cbe4d84b0fb78179686efa770c695cc5e9.tar.gz
muhqs-game-ce0392cbe4d84b0fb78179686efa770c695cc5e9.zip
format phaseChange as the next phase
Diffstat (limited to 'go/game/state.go')
-rw-r--r--go/game/state.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/go/game/state.go b/go/game/state.go
index 1ab3c95d..a4e158e1 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -154,8 +154,9 @@ func (s *LocalState) IsActivePlayer(p *Player) bool {
}
func (s *LocalState) changePhase(next PhaseType) []*Player {
+ ev := newPhaseChangeEvent(s.activePhase, next)
s.activePhase = next
- s.fireEvent(newPhaseChangeEvent())
+ s.fireEvent(ev)
return s.stateBasedActions()
}