Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Nim-game/Mathematica/nim-game.math
Normal file
8
Task/Nim-game/Mathematica/nim-game.math
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
n = 12;
|
||||
While[n > 0,
|
||||
c = ChoiceDialog["Current amount = " <> ToString[n] <> "\nHow many do you want to pick?", {1 -> 1, 2 -> 2, 3 -> 3}];
|
||||
n -= c;
|
||||
ChoiceDialog["Current amount = " <> ToString[n] <> "\nComputer takes " <> ToString[4 - c]];
|
||||
n -= (4 - c);
|
||||
]
|
||||
ChoiceDialog["Current amount = " <> ToString[n] <> "\n You lost!"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue