Skip to content

Instantly share code, notes, and snippets.

@camateg
Last active January 3, 2023 01:40
Show Gist options
  • Select an option

  • Save camateg/1a360ea2f635d4f885a05d56486c07a6 to your computer and use it in GitHub Desktop.

Select an option

Save camateg/1a360ea2f635d4f885a05d56486c07a6 to your computer and use it in GitHub Desktop.
Slot Game for Apple I
10 M = 100
20 PRINT:PRINT:PRINT:PRINT:PRINT " SLOT GAME"
30 PRINT:PRINT:PRINT
40 PRINT "HOW MUCH WOULD YOU LIKE TO BET? YOU HAVE $";
50 PRINT M
60 INPUT B
70 B = ABS(B)
80 IF B > M THEN PRINT "YOU DON'T HAVE ENOUGH!"
90 IF B > M THEN GOTO 30
100 FOR C = 1 TO 10
110 X = RND(10)
120 Y = RND(10)
130 Z = RND(10)
140 PRINT:PRINT
150 PRINT " ";
160 PRINT X;
170 PRINT ":";
180 PRINT Y;
190 PRINT ":";
200 PRINT Z;
210 FOR D = 1 TO C * 50
220 NEXT D
230 NEXT C
240 W = 0 - B
250 IF X = Y OR X = Z OR Y = Z THEN W = 5 * B
260 IF X = Y AND X = Z AND Y = Z THEN W = 20 * B
270 M = M + W
280 PRINT
290 IF W > 0 THEN PRINT "YOU WON: $";
300 IF W < 0 THEN PRINT "YOU LOST: $";
310 PRINT ABS(W)
320 PRINT "YOU HAVE: $";
330 PRINT M
340 IF M < = 0 THEN GOTO 400
350 PRINT "PLAY AGAIN";
360 INPUT A$
370 IF A$ = "N" THEN GOTO 500
380 GOTO 30
400 PRINT "YOU'RE BROKE! GOODBYE!"
500 END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment