182Games · Turn-based games

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
01

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
46, 35, 1, 1
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. 4+6=10; 3+5=8; 10>8 ⇒ +1
  3. M=1
  4. Output sequence: 46, 35, 1, 1
Do it on the calculator

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
23, 61, −1, 1
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. 2+3=5; 6+1=7; 5<7 ⇒ −1
  3. M=1
  4. Output sequence: 23, 61, −1, 1
Do it on the calculator

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
16, 43, 0, 1
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. ∅: Leave the input blank and press EXE.
  3. 1+6=7; 4+3=7; 7=7 ⇒ 0
  4. M=1
  5. Output sequence: 16, 43, 0, 1
Do it on the calculator
02

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.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.