diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-17 15:22:52 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-19 15:41:15 +0200 |
| commit | a8d818be7dbd6fbcd4e2ad484337c5f275575f41 (patch) | |
| tree | dbb65983d3cc6b4d63f8b70d02ad68aca85e023a /go/game/state.go | |
| parent | 8d85a5019d12644588e7ac112556055e7e54c266 (diff) | |
| download | muhqs-game-a8d818be7dbd6fbcd4e2ad484337c5f275575f41.tar.gz muhqs-game-a8d818be7dbd6fbcd4e2ad484337c5f275575f41.zip | |
add more events
Diffstat (limited to 'go/game/state.go')
| -rw-r--r-- | go/game/state.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/go/game/state.go b/go/game/state.go index 0d8066c0..c0b3ed37 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -168,7 +168,9 @@ func (s *LocalState) Loop() []*Player { p.Turn++ if p.Deck.IsEmpty() { - log.Printf("Shuffle %s pile into the deck\n", p.Name) + e := newShuffleEvent(p, []PileOfCards{p.DiscardPile}) + s.fireEvent(e) + p.DiscardPile.MoveInto(p.Deck) p.Deck.Shuffle(s.Rand) } @@ -464,6 +466,7 @@ func (s *LocalState) declareAction(a Action) { if err == nil { s.pushAction(a) + s.fireEvent(newDeclaredActionEvent(a)) } s.broadcastNotification(newDeclaredActionNotification(a, err)) |
