aboutsummaryrefslogtreecommitdiff
path: root/go/game/playerControl.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-01-31 00:16:53 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:45 +0100
commite6a1bb4ba06361abdc2cf1bed4041fe3013b188b (patch)
treec329a9d8d071bd2a5e3d6b5bb531da67ece2b227 /go/game/playerControl.go
parent24cea3f7c1e3679ba19ed1d49674e1228eb50ce1 (diff)
downloadmuhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.tar.gz
muhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.zip
intermediate commit
Diffstat (limited to 'go/game/playerControl.go')
-rw-r--r--go/game/playerControl.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/go/game/playerControl.go b/go/game/playerControl.go
index 5e1552f0..e62d91b3 100644
--- a/go/game/playerControl.go
+++ b/go/game/playerControl.go
@@ -8,6 +8,7 @@ const (
PriorityNotification
UpkeepPrompt
BuyPrompt
+ HandCardSelectionPrompt
)
func (n PlayerNotification) IsPriorityNotification() bool {
@@ -40,6 +41,10 @@ func NewBuyPrompt() PlayerNotification {
return PlayerNotification{BuyPrompt, nil, nil}
}
+func NewHandCardSelectionPrompt(min, max int) PlayerNotification {
+ return PlayerNotification{HandCardSelectionPrompt, []int{min, max}, nil}
+}
+
type PlayerControl interface {
RecvAction() Action
SendNotification(PlayerNotification)
@@ -47,7 +52,7 @@ type PlayerControl interface {
type DummyPlayerControl struct{ P *Player }
-func (c *DummyPlayerControl) RecvAction() Action { return NewPassPriorityAction(c.P) }
+func (c *DummyPlayerControl) RecvAction() Action { return NewPassPriority(c.P) }
func (*DummyPlayerControl) SendNotification(PlayerNotification) {}
type ChanPlayerControl struct {