diff options
Diffstat (limited to 'go/game/playerControl.go')
| -rw-r--r-- | go/game/playerControl.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/go/game/playerControl.go b/go/game/playerControl.go index 2491dab7..6d5e8e14 100644 --- a/go/game/playerControl.go +++ b/go/game/playerControl.go @@ -1,5 +1,4 @@ package game -import "log" type PlayerNotificationType int @@ -9,6 +8,10 @@ const ( PriorityNotification ) +func (n PlayerNotification) IsPriorityNotification() bool { + return n.Notification == PriorityNotification +} + type PlayerNotification struct { Notification PlayerNotificationType Action Action @@ -34,7 +37,7 @@ type PlayerControl interface { type DummyPlayerControl struct{ P *Player } func (c *DummyPlayerControl) RecvAction() Action { return NewPassPriorityAction(c.P) } -func (*DummyPlayerControl) SendNotification(PlayerNotification) { return } +func (*DummyPlayerControl) SendNotification(PlayerNotification) {} type ChanPlayerControl struct { Actions chan Action @@ -60,7 +63,6 @@ func NewChanPlayerControl() *ChanPlayerControl { } func PromptAction(ctrl PlayerControl) Action { - log.Println("PromptAction") ctrl.SendNotification(NewPriorityNotification()) return ctrl.RecvAction() } |
