Update to include fortune teller
This commit is contained in:
parent
72dd826360
commit
ec3f02b3d0
100
src/1802mc/FORTUNE.bas
Normal file
100
src/1802mc/FORTUNE.bas
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
1 REM SCC.bas
|
||||||
|
2 REM Copyright (C) 2023 William R. Moore
|
||||||
|
3 REM
|
||||||
|
4 REM This program is free software: you can redistribute it and/or modify
|
||||||
|
5 REM it under the terms of the GNU General Public License as published by
|
||||||
|
6 REM the Free Software Foundation, either version 3 of the License, or
|
||||||
|
7 REM (at your option) any later version.
|
||||||
|
8 REM
|
||||||
|
9 REM This program is distributed in the hope that it will be useful,
|
||||||
|
10 REM but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
11 REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
12 REM GNU General Public License for more details.
|
||||||
|
13 REM
|
||||||
|
14 REM You should have received a copy of the GNU General Public License
|
||||||
|
15 REM along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
20 DEFINT K
|
||||||
|
21 GOSUB 9000
|
||||||
|
22 DIM F(8), N(8)
|
||||||
|
31 F$(1)="YOU WILL BITE YOUR TONGUE."
|
||||||
|
32 F$(2)="YOU WILL FIND YOURSELF STINKING BADLY."
|
||||||
|
33 F$(3)="YOU WILL BE A DONKEY TO ALL PEOPLES."
|
||||||
|
34 F$(4)="YOU WILL FIND TRUE LOVE."
|
||||||
|
35 F$(5)="YOU WILL CONTROL A LUNATIC."
|
||||||
|
36 F$(6)="YOU WILL BE DEEP FRIED."
|
||||||
|
37 F$(7)="YOU WILL FIND YOURSELF IN A PIT OF DESPAIR"
|
||||||
|
38 F$(8)="YOU WILL BE HATLESS."
|
||||||
|
40 PRINT "1 - ORANGE"
|
||||||
|
41 PRINT "2 - YELLOW"
|
||||||
|
42 PRINT "3 - GREEN"
|
||||||
|
43 PRINT "4 - RED"
|
||||||
|
44 PRINT "TOGGLE ONE OF FIRST 4 SWITCHES (OR NONE TO END) AND ENTER ANY KEY TO CONTINUE..."
|
||||||
|
45 INPUT X$
|
||||||
|
46 I=INP(0,4)
|
||||||
|
47 IF I=1 GOSUB 100
|
||||||
|
48 IF I=2 GOSUB 100
|
||||||
|
49 IF I=4 GOSUB 100
|
||||||
|
50 IF I=8 GOSUB 100
|
||||||
|
51 IF I=0 GOTO 1000
|
||||||
|
52 GOSUB 40
|
||||||
|
100 FOR P=1 TO 8
|
||||||
|
110 N(P) = -1
|
||||||
|
120 NEXT P
|
||||||
|
130 FOR P=0 TO 4
|
||||||
|
140 K=RND(8)+1
|
||||||
|
150 IF N(K)=-1 N(K)=0:PRINT K
|
||||||
|
160 NEXT P
|
||||||
|
170 PRINT "TOGGLE ONE OF THE FIRST FOUR SWITCHES AND ENTER ANY KEY TO ENTER TO CONTINUE..."
|
||||||
|
180 INPUT X$
|
||||||
|
190 C=INP(0,4)
|
||||||
|
200 IF C=0 GOTO 1000
|
||||||
|
210 IF C=1 GOTO 260
|
||||||
|
220 IF C=2 GOTO 260
|
||||||
|
230 IF C=4 GOTO 260
|
||||||
|
240 IF C=8 GOTO 260
|
||||||
|
250 GOTO 100
|
||||||
|
260 FOR P=1 TO 8
|
||||||
|
270 N(P) = -1
|
||||||
|
280 NEXT P
|
||||||
|
290 FOR P=0 TO 4
|
||||||
|
300 K=RND(8)+1
|
||||||
|
310 IF N(K)=-1 N(K)=0:PRINT K
|
||||||
|
320 NEXT P
|
||||||
|
330 PRINT "TOGGLE ONE OF THE FIRST FOUR SWITCHES AND ENTER ANY KEY TO ENTER"
|
||||||
|
340 PRINT "AND RECEIVE YOUR FORTUNE..."
|
||||||
|
350 INPUT X$
|
||||||
|
360 C=INP(0,4)
|
||||||
|
370 IF C=0 GOTO 1000
|
||||||
|
380 IF C=1 L=1:GOTO 430
|
||||||
|
390 IF C=2 L=2:GOTO 430
|
||||||
|
400 IF C=4 L=3:GOTO 430
|
||||||
|
410 IF C=8 L=4:GOTO 430
|
||||||
|
420 GOTO 260
|
||||||
|
430 M=1
|
||||||
|
440 FOR P=1 TO 8
|
||||||
|
450 IF N(P)=0 IF M=L PRINT F$(P):EXIT 480
|
||||||
|
460 IF N(P)=0 IF M<>L M=M+1
|
||||||
|
470 NEXT P
|
||||||
|
480 RETURN
|
||||||
|
1000 PRINT "THANK YOU FOR YOUR TIME!"
|
||||||
|
1010 END
|
||||||
|
9000 N=129
|
||||||
|
9010 OUT (0,4,N)
|
||||||
|
9020 WAIT(8)
|
||||||
|
9030 N=66
|
||||||
|
9040 OUT (0,4,N)
|
||||||
|
9050 WAIT(8)
|
||||||
|
9060 N=36
|
||||||
|
9070 OUT (0,4,N)
|
||||||
|
9080 WAIT(8)
|
||||||
|
9090 N=24
|
||||||
|
9100 OUT (0,4,N)
|
||||||
|
9110 WAIT(8)
|
||||||
|
9120 N=36
|
||||||
|
9130 OUT (0,4,N)
|
||||||
|
9140 WAIT(8)
|
||||||
|
9150 N=66
|
||||||
|
9160 OUT (0,4,N)
|
||||||
|
9170 WAIT(8)
|
||||||
|
9180 OUT (0,4,0)
|
||||||
|
9190 RETURN
|
Loading…
Reference in New Issue
Block a user