This game is from the book “GAMES FOR YOUR T-S 1000” by Mark Charlton and published by DELL. I have shown a conversion to play on the 2068.
You use keys 1,2 or 3 with the goal to take the last chest.
10 RAND
15 LET P=INT (RND*15)+10
20 PRINT AT 0,0;"$▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒"( TO P); AT 5,5;P;" CCHESTS"
25 LET R=1
30 IF RND <.5 THEN GOTO 120
40 PRINT AT 8,0;" "
50 PRINT AT 12,0;"HOW MANY CHESTS WILL YOU REMOVE?"
60 LET R=CODE INKEY$-28
70 IF R<1 OR R>3 THEN GOTO 60
80 PRINT AT 12,0;" ";AT 9,0;" "
90 LET P=P-R
100 PRINT AT 5,5;P;" CHEST";"S" AND P<>1;" LEFT ";AT 8,0;"YOU REMOVED ";R;
105 GOSUB 240
110 IF P<1 THEN GOTO 220
120 LET N=INT (P/4)*4
130 IF P <>N THEN LET R=P-N
150 LET P=P-R
160 PRINT AT 9,0;"I REMOVED ";R
165 GOSUB 240
170 PRINT AT 5,5;P;" CHEST";"S" AND P<>1;" LEFT "
180 IF P<1 THEN GOTO 200
190 GOTO 40
200 PRINT AT 0,0;"$$$ I WIN $$$ "
210 STOP
220 PRINT AT 0,0;"$$$ YOU WIN $ $$"
230 STOP
240 FOR A=1 TO 10
250 PRINT AT 0,P;"▒▒▒"( TO R);AT 0,P;" "( TO R)
260 NEXT A
270 RETURN
300 SAVE "NIM"
310 RUN
To be compatable with the 2068 we must start our count from 48 instead of 28 as 0 is CODE 48. CODE 28 is 0 on the 1000.
Transcription note: the listing is corrected so it runs. As printed, line 105 reads GOSUB with no line number (240 is the only subroutine), and there is no line 25 LET R=1; without it the game stops when the computer moves first with a multiple of four chests.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.