diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-16 22:52:40 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:50:10 +0200 |
| commit | 8f81177d191b3e6d80212e1fa370d37db2fe38ce (patch) | |
| tree | 5c3e0e7834985ae1efd483a469944138809875e4 | |
| parent | 63ad22242562b1e66353694f2a17df6d1c64a8fd (diff) | |
| download | muhqs-game-8f81177d191b3e6d80212e1fa370d37db2fe38ce.tar.gz muhqs-game-8f81177d191b3e6d80212e1fa370d37db2fe38ce.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() } } |
