Dice Duel
Dice Duel
Each side rolls two six-sided dice. Compare their sums; the final count is completed rounds, not wins.
- 175 bytes
- COMP mode
Worked examples
Example 1
Original game exercise. Assumed dice (player : computer): (4,6) : (3,5). Input order: 1 → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.
Answer
Standard solution (without a calculator)
- Apply the stated rules in order.
- 4+6=10; 3+5=8; 10>8 ⇒ +1
- M=1
- Output sequence: 46, 35, 1, 1
Example 2
Original game exercise. Assumed dice (player : computer): (2,3) : (6,1). Input order: 1 → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.
Answer
Standard solution (without a calculator)
- Apply the stated rules in order.
- 2+3=5; 6+1=7; 5<7 ⇒ −1
- M=1
- Output sequence: 23, 61, −1, 1
Example 3
Original game exercise. Assumed dice (player : computer): (1,6) : (4,3). Input order: ∅ → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.
Answer
Standard solution (without a calculator)
- Apply the stated rules in order.
- ∅: Leave the input blank and press EXE.
- 1+6=7; 4+3=7; 7=7 ⇒ 0
- M=1
- Output sequence: 16, 43, 0, 1
When to use it
Each side rolls two six-sided dice. Compare their sums; the final count is completed rounds, not wins. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.
Input order
- A?: 1 or blank EXE rolls; 0 quits. Other values give −9.
Output order
- Each round shows player dice, computer dice, then 1=win, 0=tie, −1=loss. For example, 46 means dice 4 and 6, total 10. Quitting shows completed rounds only.
Conditions and limitations
- Both dice count equally; different faces with equal sums tie. The program does not keep win/loss totals.
- The program sets Fix 0, overwrites its registers and Ans, then returns to Norm 1 on normal completion. AC during play may leave Fix 0. Previous values and display settings are not restored. Registers can be inspected; there is no anti-cheating protection.
- Equal-likelihood claims assume independent equally likely Ran# grid values; no cryptographic security is claimed. When used, rejection sampling has no fixed maximum number of draws.
Checking access…