Publication: Timex Sinclair User
Pub Details: Timex Sinclair User n3 (Volume 1, Issue 3)
Date: August 1983
Pages: 37

DICE is another 2K game that takes advantage of the random number generating feature of the T/S1000,ZX81. One die appears on the screen with its number constantly and randomly changing. You stop your “roll” by pressing ENTER. That number is your score. You get ten rolls and a ten-roll total score. Then the machine takes its ten rolls. The higher score wins. Since it only uses 2K of memory, this dice routine can be used on any board game you create. (T/S1000,ZX81 2K)
10 LET M=0
11 LET Y=0
20 PRINT AT 0,2; "HIGHEST SCORE IN 10 ROLLS WINS";
AT 2,5; " YOU ME "
25 FOR I=1 TO 10
30 PRINT AT 3,6;M;AT 3,19;Y;AT 16,11;"YOUR ROLL."
35 GOSUB 180
40 LET M=M+D
45 PRINT AT 3,6;M;AT 16,10;" MY ROLL. "
50 GOSUB (200+10*INT (RND*6))
55 LET Y=Y+D
60 NEXT I
100 STOP
180 PRINT AT 18,0;"PRESS ENTER TO STOP THE DICE."
185 PRINT AT 9,12; " DICE "; AT 10,12;" ";
AT 11,12; " "; AT 12,12;" "
190 GOSUB (200+10* INT (RND*6))
192 IF INKEY$="" THEN GOTO 190
199 RETURN
200 PRINT AT 10,13;" . ";AT 11,13;" "
202 LET D=1
205 RETURN
210 PRINT AT 10,13; " . ";AT 11,13; " . "
212 LET D=2
215 RETURN
220 PRINT AT 10,13;".. "; AT 11,13;" . "
222 LET D=3
225 RETURN
230 PRINT AT 10,13;".. "; AT 11,13;".. "
232 LET D=4
235 RETURN
240 PRINT AT 10,13;"..."; AT 11,13;".. "
242 LET D=5
245 RETURN
250 PRINT AT 10,13; "...";AT 11,13; "..."
252 LET D=6
255 RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.