summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-04 13:55:23 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit42598f4c66ea86d87690b7c2468126b2340bb1c4 (patch)
treedfe5c313d57831bf46daedd25cc9b75ae144b011
parent09378fab9f98633ce8b3ee912a5fa0a52936e13d (diff)
downloadrommel-in-the-desert-42598f4c66ea86d87690b7c2468126b2340bb1c4.tar.gz
Formatting of turn option prompt.
-rw-r--r--rules.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index d0e2797..1abe86b 100644
--- a/rules.js
+++ b/rules.js
@@ -2324,7 +2324,14 @@ function player_hand() {
states.turn_option = {
inactive: "turn option",
prompt() {
- view.prompt = `Turn Option \u2014 committed ${game.commit[0]} real and ${game.commit[1]} dummy supply.`
+ if (game.commit[0] === 0 && game.commit[1] === 0)
+ view.prompt = `Turn Option: committed zero supply.`
+ else if (game.commit[1] === 0)
+ view.prompt = `Turn Option: committed ${game.commit[0]} real supply.`
+ else if (game.commit[0] === 0)
+ view.prompt = `Turn Option: committed ${game.commit[1]} dummy supply.`
+ else
+ view.prompt = `Turn Option: committed ${game.commit[0]} real and ${game.commit[1]} dummy supply.`
let hand = player_hand()
if (game.commit[0] + game.commit[1] < 3) {