aboutsummaryrefslogtreecommitdiff
path: root/go/game/action.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-07-30 20:25:15 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-07-30 20:28:56 +0200
commit5a4a5159b3dcc1caa01e81222f3f1beefcfb4b02 (patch)
tree643fa1cdddca1f03d5e76719a2afb607009d91c1 /go/game/action.go
parentf64e8747e287e949ce7cbbb42303ad1cdfabec89 (diff)
downloadmuhqs-game-5a4a5159b3dcc1caa01e81222f3f1beefcfb4b02.tar.gz
muhqs-game-5a4a5159b3dcc1caa01e81222f3f1beefcfb4b02.zip
use any instead of interface{}
Diffstat (limited to 'go/game/action.go')
-rw-r--r--go/game/action.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/go/game/action.go b/go/game/action.go
index 913e1574..cfb9809f 100644
--- a/go/game/action.go
+++ b/go/game/action.go
@@ -49,7 +49,7 @@ type Action interface {
type PassPriority struct{ player *Player }
-func (a *PassPriority) Source() interface{} { return a.player }
+func (a *PassPriority) Source() any { return a.player }
func (a *PassPriority) Controller() *Player { return a.player }
func (a *PassPriority) Speed() ActionSpeed { return fast }
func (a *PassPriority) GameState() *LocalState { return a.player.gameState }
@@ -67,7 +67,7 @@ type TargetSelection struct {
targets *Targets
}
-func (sel *TargetSelection) Source() interface{} { return sel.player }
+func (sel *TargetSelection) Source() any { return sel.player }
func (sel *TargetSelection) Controller() *Player { return sel.player }
func (sel *TargetSelection) Speed() ActionSpeed { return fast }
func (sel *TargetSelection) GameState() *LocalState { return sel.player.gameState }
@@ -96,7 +96,7 @@ type DraftPick struct {
pack PileOfCards
}
-func (pick *DraftPick) Source() interface{} { return pick.player }
+func (pick *DraftPick) Source() any { return pick.player }
func (pick *DraftPick) Controller() *Player { return pick.player }
func (pick *DraftPick) Speed() ActionSpeed { return fast }
func (pick *DraftPick) GameState() *LocalState { return pick.player.gameState }
@@ -189,7 +189,7 @@ type DeclareTriggeredActionsAction struct {
actions []*TriggeredAction
}
-func (sel *DeclareTriggeredActionsAction) Source() interface{} { return nil }
+func (sel *DeclareTriggeredActionsAction) Source() any { return nil }
func (sel *DeclareTriggeredActionsAction) Controller() *Player { return nil }
func (sel *DeclareTriggeredActionsAction) Speed() ActionSpeed { return fast }
func (sel *DeclareTriggeredActionsAction) GameState() *LocalState { return nil }
@@ -270,7 +270,7 @@ func NewPlayActionCostFunc(player *Player, cost int, card *Card) ActionCostFunc
}
}
-func NewPlayAction(p *Player, c *Card, args ...interface{}) *PlayAction {
+func NewPlayAction(p *Player, c *Card, args ...any) *PlayAction {
a := &PlayAction{
ActionBase{
source: p,