Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
15
Task/Nim-game/MSX-Basic/nim-game.basic
Normal file
15
Task/Nim-game/MSX-Basic/nim-game.basic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
100 CLS : rem 100 HOME for Applesoft BASIC
|
||||
110 LET M = 12
|
||||
120 LET L = 0
|
||||
130 IF M <= 0 THEN GOTO 220
|
||||
140 PRINT "There are "; M; " tokens remaining. How many would you like to take";
|
||||
150 INPUT L
|
||||
160 IF L <> 0 AND L <= 3 THEN GOTO 190
|
||||
170 PRINT "You must take 1, 2, or 3 tokens. How many would you like to take";
|
||||
180 GOTO 150
|
||||
190 PRINT "On my turn I will take "; 4 - L; " token(s)."
|
||||
200 LET M = M - 4
|
||||
210 GOTO 130
|
||||
220 PRINT
|
||||
230 PRINT "I got the last token. I win! Better luck next time."
|
||||
240 END
|
||||
Loading…
Add table
Add a link
Reference in a new issue