Update to include BEETLE for Altair
This commit is contained in:
parent
1e971436ed
commit
b081401666
49
src/altair8800/BEETLE.bas
Normal file
49
src/altair8800/BEETLE.bas
Normal file
@ -0,0 +1,49 @@
|
||||
1 REM BEETLE.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 RANDOMIZE(0)
|
||||
30 W=0
|
||||
40 DIM B(6)
|
||||
50 FOR P=1 TO 6
|
||||
60 B(P)=0
|
||||
70 NEXT P
|
||||
80 PRINT "TOGGLE ANY SWITCH TO END (OR NONE TO KEEP PLAYING) AND ENTER ANY KEY TO CONTINUE..."
|
||||
90 X$=INPUT$(1)
|
||||
100 I=INP(255)
|
||||
110 IF I>1 THEN GOTO 1000
|
||||
120 IF I=1 THEN PRINT "THANKS FOR PLAYING THIS ROUND!":GOTO 20
|
||||
130 GOSUB 200
|
||||
140 IF W=1 GOTO 1000
|
||||
150 IF W=0 GOTO 80
|
||||
200 DEFINT D
|
||||
210 D=INT(6*RND(6)+1)
|
||||
220 IF D=1 AND B(1)<2 THEN B(1)=B(1)+1
|
||||
230 IF D=2 AND B(2)<2 THEN B(2)=B(2)+1
|
||||
240 IF D=3 AND B(3)<6 THEN B(3)=B(3)+1
|
||||
250 IF D=4 AND B(4)<2 THEN B(4)=B(4)+1
|
||||
260 IF D=5 AND B(5)<1 THEN B(5)=1
|
||||
270 IF D=6 AND B(6)<1 THEN B(6)=1
|
||||
280 PRINT "YOUR BEETLE PARTS SO FAR:"
|
||||
290 PRINT "EYES (MAX 2):", B(1)
|
||||
300 PRINT "ANTENNA (MAX 2):", B(2)
|
||||
310 PRINT "LEG (MAX 6):", B(3)
|
||||
320 PRINT "WING (MAX 2):", B(4)
|
||||
330 PRINT "HEAD (MAX 1):", B(5)
|
||||
340 PRINT "BODY (MAX 1):", B(6)
|
||||
350 C=B(1)+B(2)+B(3)+B(4)+B(5)+B(6)
|
||||
360 IF INT(C)=14 THEN W=1:PRINT "YOU'VE MADE A BEETLE!"
|
||||
370 RETURN
|
||||
1000 PRINT "THANK YOU FOR YOUR TIME!"
|
||||
1010 END
|
Loading…
Reference in New Issue
Block a user