diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-16 22:52:40 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:50 +0100 |
| commit | 1c4651a7bba1e2b23a182152dc96902e9fb6868a (patch) | |
| tree | 6d0f81111acf78779cd4fb2e9ee7cd2f033003f4 | |
| parent | c12057320c06f9b4a0bd6c9b25a1dd2d2bd8fd8d (diff) | |
| download | muhqs-game-1c4651a7bba1e2b23a182152dc96902e9fb6868a.tar.gz muhqs-game-1c4651a7bba1e2b23a182152dc96902e9fb6868a.zip | |
do not prompt if there is nothing to buy
| -rw-r--r-- | go/game/player.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/go/game/player.go b/go/game/player.go index 802cafeb..4abe4d23 100644 --- a/go/game/player.go +++ b/go/game/player.go @@ -114,6 +114,10 @@ func (p *Player) ActionPhase() { } func (p *Player) BuyPhase() { + s := p.gameState + if p.Store.Size() == 0 && s.Map.HasStores() && len(p.knownStores) == 0 { + return + } a := promptBuy(p.Ctrl) if _, ok := a.(*PassPriority); ok { @@ -121,8 +125,8 @@ func (p *Player) BuyPhase() { } if a.Targets().HasSelections() { - p.gameState.DeclareAction(a) - p.gameState.Stack.Resolve() + s.DeclareAction(a) + s.Stack.Resolve() } } |
