aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/state.go')
-rw-r--r--go/game/state.go5
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))