Title: スロットマシン (Slot Machine)
System: Family Basic
Author: 
Publication: ファミリーコンピュータ大図鑑 PART2 (Family Computer Encyclopedia Part 2)
Page Scans: 
Preserved By: ozidual
Recommended Emulator: VirtualNES

How to play

Enter your bet with the keyboard and press SPACE to stop each piece of the slot machine.


Combinations

If you get two of the same character, your bet will be 6x.
If you get three of the same character, your bet will be 9x.
If you get four of the same character, your bet will be 12x
If you get 1 penpen, your bet will be 6x.
If you get 2 penpens, your bet will be 12x.
If you get 3 penpens, your bet will be 18x.
If you get 4 penpens, your bet will be 24x.


Code

10 DIM PA(5),CO(5),TI(3),N(3)
20 CLS:VIEW:CGSET 1,2
30 SPRITE ON
40 GOSUB 6000
50 SC=10:KA=0
60 GOSUB 2300
70 '
1000 CT=4:F=0
1010 GOSUB 8000:GOSUB2100
1020 FOR I=0 TO 3
1030 IF MOVE(I)=0 THEN GOSUB 8200
1080 NEXT
1090 IF F=0 AND INKEY$=" " THEN PLAY"T1O4E":F=1:CT=3
1100 IF  F=1 THEN GOSUB 5000
1110 IF CT<>0 THEN 1020
1120 GOSUB 3000:GOSUB 3500
1130 IF SC<>0 THEN 1000
1140 LOCATE 4,22
1150 PRINT "アナタハ ハサンシマシタ!"
1160 PAUSE 200
1170 LOCATE 4,2
1180 PRINT "モウイチド チョウヤンシヨウ"
1190 PAUSE 200
1200 GOTO 50
1210 '
2100 KA=0:GOSUB 2300
2110 LOCATE 15,22
2120 PRINT "    ";
2130 LOCATE 4,22
2140 INPUT "イクラ カケマスカ ";KA
2150 IF KA>SC OR KA<1 THEN 2100
2160 SC=SC-KA
2170 CUT 0,1,2,3
2200 FOR I=0 TO 3
2210 TI(I)=3+RND(3)
2220 NEXT
2300 LOCATE 1,12
2310 PRINT RIGHT$("   "+STR$(SC),5)
2320 LOCATE 1,16
2330 PRINT RIGHT$("   "+STR$(KA),5)
2340 RETURN
2350 '
3000 FOR I=0 TO 3
3010 IF MOVE(I) THEN 3010
3020 NEXT
3030 RETURN
3040 '
3500 CH=N(0):V=0
3510 FOR I=1 TO 3
3520 IF N(I)<>CH THEN I=3:GOTO 3550
3540 V=V+1
3550 NEXT
3560 LOCATE 4,22
3570 IF V<>0 OR CH=1 THEN 3600
3580 PRINT "ザンネンデシタ       "
3590 GOTO 3630
3600 A=(V+1)*(1-(CH=1))*3
3610 PRINT "ヤッタゾ ";RIGHT$("   "+STR$(A),4);" バイダ "
3620 SC=SC+KA*A
3630 PAUSE 100
3640 RETURN
3650 '
5000 IF TI(CT)<10 THEN 5030
5010 IF RND(10)>3 THEN 5060
5020 CT=CT-1:GOTO 5060
5030 IF CT=3 THEN 5050
5040 IF MOVE(CT+1) THEN 5060
5050 IF RND(10)<5 THEN TI(CT)=TI(CT)+2
5060 RETURN
5070 '
6000 RESTORE:FOR I=0 TO 5
6010 READ PA(I),CO(I)
6020 NEXT
6030 FOR I=0 TO 3
6040 N(I)=RND(6)
6050 NEXT
6060 RETURN
6070 DATA 2,1,4,0,11,2
6080 DATA 13,3,14,2,15,0
6090 '
8000 FOR I=0 TO 3
8010 DEF MOVE(I)=SPRITE (PA(N(I)),0,20,255,1,CO(N(I)))
8020 POSITION I,80+24*I,79
8030 NEXT
8040 MOVE 0,1,2,3
8050 RETURN
8060 '
8200 T=TI(I)
8210 IF CT<=I THEN 8300
8220 A=N(I):X=80+24*I
8230 IF I=0 THEN PLAY "T1Y0M0V15O5E"
8240 DEF MOVE(I)=SPRITE (PA(A),5,T,8,1,CO(A))
8251 POSITION I,X,79
8260 A=A+1:A=A-A/6*6:N(I)=A
8270 DEF MOVE(I+4)=SPRITE(PA(A),5,T,8,1,CO(A))
8280 POSITION I+4,X,63
8290 MOVE I,I+4
8300 RETURN