MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

SLOT

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 TL=0: TW=0: DIM T$(8,5)
110 CLS: PRINT@9,"SLOT MACHINE"
120 FOR I=1 TO 8
130 FOR J=1 TO 5
140 READ T$(I,J)
150 NEXT J,I
160 GOSUB390
170 GOSUB530
180 PRINT@480,"PRESS P TO PLAY";
190 A$=INKEY$: ZZ=RND(1000)
200 IF A$="" THEN 190
210 IF A$<>"P" THEN 190
220 GOSUB690
230 IF NOT (P1=P2 AND P1=P3) THEN 270
240 GOSUB 980
250 IF P1=6 THEN TC=50: TW=TW+50: GOSUB 980: GOTO310
260 TC=6: TW=TW+6: GOTO310
270 IF (P1=P2) AND (P1=6 OR P1=2) THEN TC=6: TW=TW+6: GOTO310
280 IF P1=P2 THEN TC=3: TW=TW+3: GOTO310
290 IF P1=2 THEN TC=3: TW=TW+3: GOTO310
300 TC=0: TL=TL+1
310 REM -- PRINT TOTALS
320 PRINT@461,"     ";
330 PRINT@448,"CURR.PAYOFF=$" ;TC;
340 PRINT@473,"     ";
350 PRINT@468,"WON=$";TW;
360 PRINT@505,"     ";
370 PRINT@499,"LOST=$";TL;
380 GOTO180
390 REM -- SUBR. FOR OUTLINE
400 FOR I=66 TO 88
410 PRINT@I,CHR$(131);: NEXT I
420 PRINT@89,CHR$(130);
430 FOR I=121 TO 409 STEP 32
440 PRINT@I,CHR$(138);: NEXT I
450 PRINT@441,CHR$(136);
460 FOR I=440 TO 418 STEP -1
470 PRINT@I,CHR$(140);: NEXT I
480 PRINT@417,CHR$(132);
490 FOR I=385 TO 97 STEP -32
500 PRINT@I,CHR$(133);: NEXT I
510 PRINT@65,CHR$( 129);
520 RETURN
530 REM -- SUBR. FOR HANDLE UP
540 PRINT@347,"  ";
550 PRINT@410,CHR$(131)+CHR$(132)+CHR$(140)+CHR$(136);
560 PRINT@381,CHR$(138);
570 FOR H=347 TO 187 STEP -32
580 PRINT@H,CHR$(133)+" "+CHR$(138);: NEXT H
590 PRINT@155 ,CHR$(129)+CHR$(131)+CHR$(130);
600 PRINT@346,CHR$(140);
610 RETURN
620 REM--SUBR. FOR HANDLE DOWN
630 FOR H=154 TO 410 STEP 32
640 PRINT@H,"     ";: NEXT H
650 PRINT@410,CHR$(131)+CHR$(132)+CHR$(140)+CHR$(136);
660 PRINT@381,CHR$(138);
670 PRINT@346,CHR$(140)+CHR$(129)+CHR$(131)+CHR$(130);
680 RETURN
690 REM -- PRINT FIGURES
700 GOSUB620
710 FOR J=0 TO 4
720 FOR P=196 TO 210 STEP 7
730 PRINT@P+(J*32),CHR$(128)+CHR$(128)+CHR$(128)+CHR$(128)+CHR$(128);
740 NEXT P,J
750 GOSUB530
760 FOR P=196 TO 210 STEP 7
770 I=RND(8)
780 IF P=196 THEN P1=I
790 IF P=203 THEN P2=I
800 IF P=210 THEN P3=I
810 K=((I-1)*16)+1
820 FOR J=1 TO 5
830 A=VAL(LEFT$(T$(1,J),1))*K
840 B=VAL(MID$(T$(I,J),2,1))*K
850 C=VAL(MID$(T$(I,J),3,1))*K
860 D=VAL(MID$(T$(I,J),4,1))*K
870 E=VAL(RIGHT$(T$(I,J),1))*K
880 F=128
890 PRINT@P+((J-1)*32),CHR$(F+A)+CHR$(F+B)+CHR$(F+C)+CHR$(F+D)+CHR$(F+E);
900 NEXT J: SOUND 135,1
910 NEXT P
920 RETURN
930 DATA 00000,01010,00100,01010,00000,00000,01110,01010,01110,00000
940 DATA 10000,01000,00100,00010,00001,00000,00100,01110,00100,00000
950 DATA 00001,00010,00100,01000,10000,00100,01110,01110,01110,00100
960 DATA 00000,00000,11111,00000,00000,00100,00100,00100,00100,00100
970 DATA -1,185,4,197,2,1,1,185,4,189,4,197,6,0,0
980 RESTORE
990 READ ZZ: IF ZZ<>-1 THEN 990
1000 READ ZT,ZD: IF ZT=0 THEN 1050
1010 IF ZT=1 THEN 1030
1020 SOUND ZT,ZD
1030 FOR ZT=1 TO 20:NEXT ZT
1040 GOTO 1000
1050 RETURN