diff options
Diffstat (limited to 'go/game/playerControl.go')
| -rw-r--r-- | go/game/playerControl.go | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/go/game/playerControl.go b/go/game/playerControl.go index dda1a736..eea6a19b 100644 --- a/go/game/playerControl.go +++ b/go/game/playerControl.go @@ -8,12 +8,28 @@ import ( type PlayerNotificationType int const ( - DeclaredActionNotification = iota + DeclaredActionNotification PlayerNotificationType = iota ResolvedActionNotification PriorityNotification TargetSelectionPrompt ) +func (n PlayerNotificationType) String() string { + switch n { + case DeclaredActionNotification: + return "DeclaredActionNotification" + case ResolvedActionNotification: + return "ResolvedActionNotification" + case PriorityNotification: + return "PriorityNotification" + case TargetSelectionPrompt: + return "TargetSelectionPrompt" + default: + log.Panicf("Unhandled notification %d", n) + return "" + } +} + func (n PlayerNotification) IsPriorityNotification() bool { return n.Notification == PriorityNotification } @@ -61,7 +77,6 @@ func newUpkeepPrompt(p *Player) PlayerNotification { func newBuyPrompt(p *Player) PlayerNotification { a := newBuyAction(p) prompt := newTargetSelectionPrompt(a, "Select a card to buy") - log.Println("sending buy prompt with ctx", prompt) return prompt } |
