diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-26 18:21:06 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-26 18:21:06 +0200 |
| commit | 1d7a26ff27a3197150a038d311a410096e02b108 (patch) | |
| tree | a5c9245a55fc488b4e4dec0e790a248f0df889bc | |
| parent | 7580ff84ca18afecc3aaed52fd075fcdd25ee102 (diff) | |
| download | muhqs-game-1d7a26ff27a3197150a038d311a410096e02b108.tar.gz muhqs-game-1d7a26ff27a3197150a038d311a410096e02b108.zip | |
fix target selection prompt
Only allow to progress to the next target if the current one does
not require further selection.
| -rw-r--r-- | go/client/game.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/go/client/game.go b/go/client/game.go index f4262f67..5689c88c 100644 --- a/go/client/game.go +++ b/go/client/game.go @@ -504,12 +504,17 @@ func (g *Game) updateButtons() { passButtonLabel := "pass" if g.prompt != nil { targets := g.prompt.Action().Targets() + target := targets.Cur() + // We still need a selection if targets.RequireSelection() { - if !targets.Cur().HasSelection() { + // The current target requires a selection + if target.RequireSelection() { g.hide(g.passButton) g.show(g.resetButton) return } + // The current target does not need further selections so we can + // offer to go to the next target. passButtonLabel = "next" } else { passButtonLabel = "confirm" |
