aboutsummaryrefslogtreecommitdiff
path: root/go/game/player.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-08 15:38:07 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-08 15:41:45 +0200
commita3ca136cd776ff0089dc33e401d1fc474dc17138 (patch)
tree1968a8ff318c7f021e2cc94df5a057eeee39b099 /go/game/player.go
parentee605fa7fa48803756b0c3216afc4bd692ec144a (diff)
downloadmuhqs-game-a3ca136cd776ff0089dc33e401d1fc474dc17138.tar.gz
muhqs-game-a3ca136cd776ff0089dc33e401d1fc474dc17138.zip
support explicitly winning and implement Approach Supremacy!
Diffstat (limited to 'go/game/player.go')
-rw-r--r--go/game/player.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/go/game/player.go b/go/game/player.go
index b3cdfe0f..09488a32 100644
--- a/go/game/player.go
+++ b/go/game/player.go
@@ -16,6 +16,7 @@ type Player struct {
Resource int
DrawPerTurn int
Conceded bool
+ Won bool
Hand *Hand
DiscardPile *DiscardPile
Deck *Deck
@@ -323,3 +324,7 @@ func (p *Player) concede() {
p.Conceded = true
p.gameState.broadcastNotification(newConcededNotification(p))
}
+
+func (p *Player) win() {
+ p.Won = true
+}