mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
Add HANG, ORBIT and TOWER.
This commit is contained in:
parent
6de2259c09
commit
84d084e40b
77
dec/HANG.BAS
Normal file
77
dec/HANG.BAS
Normal file
@ -0,0 +1,77 @@
|
||||
10 REM *** GAME OF HANGMAN BY DAVE AHL, DIGITAL
|
||||
15 REM *** BASED ON A PROGRAM WRITTEN BY KEN AUPPERLE, CLASS OF '75,
|
||||
20 REM *** HALF HOLLOW HILLS H.S., DIX HILLS, NY
|
||||
25 &"GAME OF HANGMAN":&:&
|
||||
30 DIM P$(12,12),L$(20),D$(20),N$(26),U(50)
|
||||
40 C=1:RANDOMIZE:N=50
|
||||
50 D$(I)="-" FOR I=1 TO 20:M=0
|
||||
60 N$(I)="" FOR I=1 TO 26
|
||||
70 FOR I=1 TO 12:FOR J=1 TO 12:P$(I,J)=" ":NEXT J:NEXT I
|
||||
80 P$(I,1)="X" FOR I=1 TO 12
|
||||
90 P$(1,I)="X" FOR I=1 TO 7:P$(2,7)="X"
|
||||
95 IF C<N THEN 100 ELSE PRINT "YOU DID ALL THE WORDS!!":STOP
|
||||
100 Q=INT(N*RND+1)
|
||||
110 IF U(Q)=1 THEN 100 ELSE U(Q)=1:C=C+1:RESTORE:T1=0
|
||||
150 READ A$ FOR I=1 TO Q
|
||||
160 L=LEN(A$):L$(I)=MID$(A$,I,1) FOR I=1 TO L
|
||||
170 &"HERE ARE THE LETTERS YOU USED:"
|
||||
180 FOR I=1 TO 26:& N$(I);:IF N$(I+1)="" THEN 200
|
||||
190 PRINT ",";:NEXT I
|
||||
200 &:&:FOR I=1 TO L:& D$(I);:NEXT I:&:&
|
||||
210 INPUT "WHAT IS YOUR GUESS";G$:R=0
|
||||
220 FOR I=1 TO 26:IF N$(I)="" THEN 250
|
||||
230 IF G$=N$(I) THEN & "YOU GUESSED THAT LETTER BEFORE!":GOTO 170
|
||||
240 NEXT I:& "PROGRAM ERROR. RUN AGAIN.":STOP
|
||||
250 N$(I)=G$:T1=T1+1
|
||||
260 FOR I=1 TO L:IF L$(I)=G$ THEN 280
|
||||
270 NEXT I:IF R=0 THEN 290 ELSE GOTO 300
|
||||
280 D$(I)=G$:R=R+1:GOTO 270
|
||||
290 M=M+1:GOTO 400
|
||||
300 FOR I=1 TO L:IF D$(I)="-" THEN 320
|
||||
310 NEXT I:GOTO 390
|
||||
320 &:FOR I=1 TO L:& D$(I);:NEXT I:&:&
|
||||
330 INPUT "WHAT IS YOUR GUESS FOR THE WORD";B$
|
||||
340 IF B$=A$ THEN 360
|
||||
350 &"WRONG. TRY ANOTHER LETTER.":&:GOTO 170
|
||||
360 &"RIGHT!! IT TOOK YOU"T1"GUESSES!"
|
||||
370 INPUT "WANT ANOTHER WORD";W$:IF W$="YES" THEN 50
|
||||
380 &:&"IT'S BEEN FUN! BYE FOR NOW.":STOP
|
||||
390 &"YOU FOUND THE WORD!":GOTO 370
|
||||
400 &:&:&"SORRY, THAT LETTER ISN'T IN THE WORD."
|
||||
410 ON M GOTO 415,420,425,430,435,440,445,450,455,460
|
||||
415 &"FIRST, WE DRAW A HEAD":GOTO 470
|
||||
420 &"NOW WE DRAW A BODY":GOTO 470
|
||||
425 &"NEXT WE DRAW AN ARM":GOTO 470
|
||||
430 &"THIS TIME IT'S THE OTHER ARM":GOTO 470
|
||||
435 &"NOW, LET'S DRAW THE RIGHT LEG":GOTO 470
|
||||
440 &"THIS TIME WE DRAW THE LEFT LEG":GOTO 470
|
||||
445 &"NOW WE PUT UP A HAND":GOTO 470
|
||||
450 &"NEXT THE OTHER HAND":GOTO 470
|
||||
455 &"NOW WE DRAW ONE FOOT":GOTO 470
|
||||
460 &"HERE'S THE OTHER FOOT -- YOU'RE HUNG!!"
|
||||
470 ON M GOTO 480,490,500,510,520,530,540,550,560,570
|
||||
480 P$(3,6)="-":P$(3,7)="-":P$(3,8)="-":P$(4,5)="(":P$(4,6)="."
|
||||
481 P$(4,8)=".":P$(4,9)=")":P$(5,6)="-":P$(5,7)="-":P$(5,8)="-":GOTO 580
|
||||
490 P$(I,7)="X" FOR I=6 TO 9:GOTO 580
|
||||
500 P$(I,I-1)="\" FOR I=4 TO 7:GOTO 580
|
||||
510 P$(4,11)="/":P$(5,10)="/":P$(6,9)="/":P$(7,8)="/":GOTO 580
|
||||
520 P$(10,6)="/":P$(11,5)="/":GOTO 580
|
||||
530 P$(10,8)="\":P$(11,9)="\":GOTO 580
|
||||
540 P$(3,11)="\":GOTO 580
|
||||
550 P$(3,3)="/":GOTO 580
|
||||
560 P$(12,10)="\":P$(12,11)="-":GOTO 580
|
||||
570 P$(12,3)="-":P$(12,4)="/"
|
||||
580 FOR I=1 TO 12:FOR J=1 TO 12:& P$(I,J);:NEXT J
|
||||
590 &:NEXT I:&:&:IF M=10 THEN 600 ELSE 170
|
||||
600 &"SORRY, YOU LOSE. THE WORD WAS "A$
|
||||
610 &"YOU MISSED THAT ONE. DO YOU ":GOTO 370
|
||||
700 DATA "GUM","SIN","FOR","CRY","LUG","BYE","FLY"
|
||||
710 DATA "UGLY","EACH","FROM","WORK","TALK","WITH","SELF"
|
||||
720 DATA "PIZZA","THING","FEIGN","FIEND","ELBOW","FAULT","DIRTY"
|
||||
730 DATA "BUDGET","SPIRIT","QUAINT","MAIDEN","ESCORT","PICKAX"
|
||||
740 DATA "EXAMPLE","TENSION","QUININE","KIDNEY","REPLICA","SLEEPER"
|
||||
750 DATA "TRIANGLE","KANGAROO","MAHOGANY","SERGEANT","SEQUENCE"
|
||||
760 DATA "MOUSTACHE","DANGEROUS","SCIENTIST","DIFFERENT","QUIESCENT"
|
||||
770 DATA "MAGISTRATE","ERRONEOUSLY","LOUDSPEAKER","PHYTOTOXIC"
|
||||
780 DATA "MATRIMONIAL","PARASYMPATHOMIMETIC","THIGMOTROPISM"
|
||||
999 END
|
96
dec/ORBIT.BAS
Normal file
96
dec/ORBIT.BAS
Normal file
@ -0,0 +1,96 @@
|
||||
5 RANDOMIZE
|
||||
10 PRINT "SOMEWHERE ABOVE YOUR PLANET IS A ROMULAN SHIP."
|
||||
15 PRINT
|
||||
20 PRINT "THIS SHIP IS IN A CONSTANT POLAR ORBIT. IT S"
|
||||
25 PRINT "DISTANCE FROM THE CENTER OF YOUR PLANET IS FROM"
|
||||
30 PRINT "10,000 TO 30,000 MILES AND AT IT'S PRESENT VELOCITY CAN"
|
||||
31 PRINT "CIRCLE YOUR PLANET ONCE EVERY 12 TO 36 HOURS."
|
||||
35 PRINT
|
||||
40 PRINT "UNFORTUNATELY THEY ARE USING A CLOAKING DEVICE SO"
|
||||
45 PRINT "YOU ARE UNABLE TO SEE THEM, BUT WITH A SPECIAL "
|
||||
50 PRINT "INSTRUMENT YOU CAN TELL HOW NEAR THEIR SHIP YOUR"
|
||||
55 PRINT "PHOTON BOMB EXPLODED. YOU HAVE SEVEN HOURS UNTIL THEY"
|
||||
60 PRINT "HAVE BUILT UP SUFFICIENT POWER IN ORDER TO ESCAPE "
|
||||
65 PRINT "YOUR PLANET'S GRAVITY."
|
||||
70 PRINT
|
||||
75 PRINT "YOUR PLANET HAS ENOUGH POWER TO FIRE ONE BOMB AN HOUR."
|
||||
80 PRINT
|
||||
85 PRINT "AT THE BEGINNING OF EACH HOUR YOU WILL BE ASKED TO GIVE AN"
|
||||
90 PRINT "ANGLE (BETWEEN 0 AND 360) AND A DISTANCE IN UNITS OF"
|
||||
95 PRINT "100 MILES (BETWEEN 100 AND 300), AFTERWHICH YOUR BOMB'S"
|
||||
100 PRINT "DISTANCE FROM THE ENEMY SHIP WILL BE GIVEN."
|
||||
105 PRINT
|
||||
110 PRINT "AN EXPLOSION WITHIN 5,000 MILES OF THE ROMULAN SHIP"
|
||||
111 PRINT "WILL DESTROY IT."
|
||||
114 PRINT
|
||||
115 PRINT "BELOW IS A DIAGRAM TO HELP YOU VISUALIZE YOUR PLIGHT."
|
||||
116 PRINT
|
||||
117 PRINT
|
||||
168 PRINT " 90"
|
||||
169 PRINT " ^"
|
||||
170 PRINT " 0000000000000"
|
||||
171 PRINT " 0000000000000000000"
|
||||
172 PRINT " 000000 000000"
|
||||
173 PRINT " 00000 00000"
|
||||
174 PRINT " 00000 XXXXXXXXXXX 00000"
|
||||
175 PRINT " 00000 XXXXXXXXXXXXX 00000"
|
||||
176 PRINT " 0000 XXXXXXXXXXXXXXX 0000"
|
||||
177 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000"
|
||||
178 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000"
|
||||
179 PRINT "180<== 00000 XXXXXXXXXXXXXXXXXXX 00000 ==>0"
|
||||
180 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000"
|
||||
181 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000"
|
||||
182 PRINT " 0000 XXXXXXXXXXXXXXX 0000"
|
||||
183 PRINT " 00000 XXXXXXXXXXXXX 00000"
|
||||
184 PRINT " 00000 XXXXXXXXXXX 00000"
|
||||
185 PRINT " 00000 00000"
|
||||
186 PRINT " 000000 000000"
|
||||
187 PRINT " 0000000000000000000"
|
||||
188 PRINT " 0000000000000"
|
||||
189 PRINT " !"
|
||||
190 PRINT " 270"
|
||||
192 PRINT
|
||||
195 PRINT "X - YOUR PLANET"
|
||||
196 PRINT "O - THE ORBIT OF THE ROMULAN SHIP"
|
||||
197 PRINT
|
||||
198 PRINT "ON THE ABOVE DIAGRAM, THE ROMULAN SHIP IS CIRCLING"
|
||||
199 PRINT "COUNTERCLOCKWISE AROUND YOUR PLANET. DON'T FORGET"
|
||||
200 PRINT "WITHOUT SUFFICIENT POWER THE ROMULAN SHIP'S ALTITUDE"
|
||||
210 PRINT "AND ORBITAL RATE WILL REMAIN CONSTANT."
|
||||
220 PRINT
|
||||
230 PRINT "GOOD LUCK. THE FEDERATION IS COUNTING ON YOU."
|
||||
270 LET A=INT(RND*360)
|
||||
280 LET D=INT(RND*200) +100
|
||||
290 LET R=INT(RND*20) +10
|
||||
300 LET H=0
|
||||
310 IF H=7 GOTO 490
|
||||
320 LET H=H+1
|
||||
325 PRINT
|
||||
326 PRINT
|
||||
330 PRINT "HOUR";H;", AT WHAT ANGLE DO YOU WISH TO SEND"
|
||||
335 PRINT "YOUR PHOTON BOMB?"
|
||||
340 INPUT A1
|
||||
350 PRINT "HOW FAR OUT DO YOU WISH TO DETONATE IT?"
|
||||
360 INPUT D1
|
||||
365 PRINT
|
||||
366 PRINT
|
||||
370 LET A=A+R
|
||||
380 IF A<360 GOTO 400
|
||||
390 LET A=A-360
|
||||
400 LET T=ABS(A-A1)
|
||||
410 IF T<180 GOTO 430
|
||||
420 LET T=360-T
|
||||
430 LET C=SQR(D*D+D1*D1-2*D*D1*COS(T*3.14159/180))
|
||||
440 PRINT "YOUR PHOTON BOMB EXPLODED";C;"*10^2 MILES FROM THE"
|
||||
445 PRINT "ROMULAN SHIP"
|
||||
450 IF C<=50 GOTO 470
|
||||
460 GOTO 310
|
||||
470 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR MISSION."
|
||||
480 GOTO 500
|
||||
490 PRINT "YOU HAVE ALLOWED THE ROMULANS TO ESCAPE."
|
||||
500 PRINT "ANOTHER ROMULAN SHIP HAS GONE INTO ORBIT."
|
||||
510 PRINT "DO YOU WISH TO TRY TO DESTROY IT?"
|
||||
520 INPUT C$
|
||||
530 IF C$="YES" GOTO 270
|
||||
540 PRINT "PLEASE LOGOUT"
|
||||
999 END
|
120
dec/TOWER.BAS
Normal file
120
dec/TOWER.BAS
Normal file
@ -0,0 +1,120 @@
|
||||
90 PRINT
|
||||
100 REM *** INITIALIZE
|
||||
110 DIM T(7,3)
|
||||
120 E=0
|
||||
130 FOR D=1 TO 7
|
||||
140 FOR N=1 TO 3
|
||||
150 T(D,N)=0
|
||||
160 NEXT N
|
||||
170 NEXT D
|
||||
180 PRINT "TOWERS OF HANOI PUZZLE"\PRINT
|
||||
200 PRINT "YOU MUST TRANSFER THE DISKS FROM THE LEFT TO THE RIGHT"
|
||||
205 PRINT "TOWER, ONE AT A TIME, NEVER PUTTING A LARGER ON A"
|
||||
210 PRINT "SMALLER DISK."\PRINT
|
||||
215 PRINT "HOW MANY DISKS DO YOU WANT TO MOVE (7 IS MAX)";
|
||||
220 INPUT S\PRINT
|
||||
230 M=0
|
||||
240 FOR Q=1 TO 7
|
||||
250 IF Q=S THEN 350
|
||||
260 NEXT Q
|
||||
270 E=E+1
|
||||
280 IF E>2 THEN 310
|
||||
290 PRINT "SORRY, BUT I CAN'T DO THAT JOB FOR YOU."\GOTO 215
|
||||
310 PRINT "ALRIGHT, WISE GUY, IF YOU CAN'T PLAY THE GAME RIGHT, I'LL"
|
||||
320 PRINT "JUST TAKE MY PUZZLE AND GO HOME. SO LONG."\STOP
|
||||
340 REM *** STORE DISKS FROM SMALLEST TO LARGEST
|
||||
350 PRINT "IN THIS PROGRAM, WE SHALL REFER TO DISKS BY NUMERICAL CODE."
|
||||
355 PRINT "3 WILL REPRESENT THE SMALLEST DISK, 5 THE NEXT SIZE, 7 THE NEXT,"
|
||||
360 PRINT "AND SO ON, UP TO 15. IF YOU DO THE PUZZLE WITH 2 DISKS, THEIR"
|
||||
365 PRINT "CODE NAMES WOULD BE 13 AND 15. WITH THREE DISKS, THE CODE"
|
||||
370 PRINT "NAMES WOULD BE 11, 13 AND 15, ETC. THE NEEDLES ARE"
|
||||
375 PRINT "NUMBERED FROM LEFT TO RIGHT, 1 TO 3. WE WILL START WITH THE "
|
||||
380 PRINT "DISKS ON NEEDLE 1, AND ATTEMPT TO MOVE THEM TO NEEDLE 3."
|
||||
390 PRINT\PRINT "GOOD LUCK!!"\PRINT
|
||||
400 Y=7\D=15
|
||||
420 FOR X=S TO 1 STEP -1
|
||||
430 T(Y,1)=D\D=D-2\Y=Y-1
|
||||
460 NEXT X
|
||||
470 GOSUB 1230
|
||||
480 PRINT "WHICH DISK WOULD YOU LIKE TO MOVE";\E=0
|
||||
500 INPUT D
|
||||
510 IF (D-3)*(D-5)*(D-7)*(D-9)*(D-11)*(D-13)*(D-15)=0 THEN 580
|
||||
520 PRINT "ILLEGAL ENTRY...YOU MAY ONLY TYPE 3,5,7,9,11,13, OR 15."
|
||||
530 E=E+1\IF E>1 THEN 560
|
||||
550 GOTO 500
|
||||
560 PRINT\PRINT "STOP WASTING MY TIME. GO BOTHER SOMEONE ELSE."\STOP
|
||||
580 REM *** CHECK IF REQUESTED DISK IS BELOW ANOTHER
|
||||
590 FOR R=1 TO 7
|
||||
600 FOR C=1 TO 3
|
||||
610 IF T(R,C)=D THEN 640
|
||||
620 NEXT C\NEXT R
|
||||
640 FOR Q=R TO 1 STEP -1
|
||||
645 IF T(Q,C)=0 THEN 660
|
||||
650 IF T(Q,C)<D THEN 680
|
||||
660 NEXT Q
|
||||
670 GOTO 700
|
||||
680 PRINT "THAT DISK IS BELOW ANOTHER ONE. MAKE ANOTHER CHOICE."\GOTO 480
|
||||
700 E=0
|
||||
705 PRINT "PLACE DISK ON WHICH NEEDLE";\INPUT N
|
||||
730 IF (N-1)*(N-2)*(N-3)=0 THEN 800
|
||||
735 E=E+1
|
||||
740 IF E>1 THEN 780
|
||||
750 PRINT "I'LL ASSUME YOU HIT THE WRONG KEY THIS TIME. BUT WATCH IT,"
|
||||
760 PRINT "I ONLY ALLOW ONE MISTAKE."\GOTO 705
|
||||
780 PRINT "I TRIED TO WARN YOU, BUT YOU WOULDN'T LISTEN."
|
||||
790 PRINT "BYE, BYE, BIG SHOT."\STOP
|
||||
800 FOR R=1 TO 7
|
||||
810 IF T(R,N)<>0 THEN 840
|
||||
820 NEXT R
|
||||
830 GOTO 880
|
||||
835 REM *** CHECK IF DISK TO BE PLACED ON A LARGER ONE
|
||||
840 IF D<T(R,N) THEN 880
|
||||
850 PRINT "YOU CAN'T PLACE A LARGER DISK ON TOP OF A SMALLER ONE."
|
||||
860 PRINT "IT MIGHT CRUSH IT!"\PRINT "NOW THEN, ";\GOTO 480
|
||||
875 REM *** RELOCATE MOVED DISK
|
||||
880 FOR V=1 TO 7\FOR W=1 TO 3
|
||||
900 IF T(V,W)=D THEN 930
|
||||
910 NEXT W\NEXT V
|
||||
925 REM *** LOCATE FIRST EMPTY SPACE ON NEEDLE N
|
||||
930 FOR U=1 TO 7
|
||||
940 IF T(U,N)<>0 THEN 970
|
||||
950 NEXT U
|
||||
960 GOTO 980
|
||||
965 REM *** MOVE DISK AND SET OLD LOCATION TO 0
|
||||
970 U=U-1
|
||||
980 T(U,N)=T(V,W)\T(V,W)=0
|
||||
995 REM *** PRINT OUT CURRENT STATUS
|
||||
1000 GOSUB 1230
|
||||
1018 REM *** CHECK IF DONE
|
||||
1020 M=M+1
|
||||
1030 FOR R=1 TO 7\FOR C=1 TO 2
|
||||
1050 IF T(R,C)<>0 THEN 1090
|
||||
1060 NEXT C\NEXT R
|
||||
1080 GOTO 1120
|
||||
1090 IF M<=128 THEN 480
|
||||
1100 PRINT "SORRY, BUT I HAVE ORDERS TO STOP IF YOU MAKE MORE THAN"
|
||||
1110 PRINT "128 MOVES."\STOP
|
||||
1120 IF M<>2^S-1 THEN 1140
|
||||
1130 PRINT "CONGRATULATIONS!! ";
|
||||
1140 PRINT "YOU HAVE PERFORMED THE TASK IN"M"MOVES."
|
||||
1150 PRINT\PRINT "TRY ANOTHER ONE (YES OR NO)";\INPUT A$
|
||||
1160 IF A$="NO" THEN 1390
|
||||
1170 IF A$="YES" THEN 90
|
||||
1180 PRINT\PRINT "'YES' OR 'NO' PLEASE";\INPUT A$\GOTO 1160
|
||||
1230 REM *** PRINT SUBROUTINE
|
||||
1240 FOR K=1 TO 7
|
||||
1250 Z=10
|
||||
1260 FOR J=1 TO 3
|
||||
1270 IF T(K,J)=0 THEN 1330
|
||||
1280 PRINT TAB(Z-INT(T(K,J)/2));
|
||||
1290 FOR V=1 TO T(K,J)
|
||||
1300 PRINT "*";
|
||||
1310 NEXT V
|
||||
1320 GOTO 1340
|
||||
1330 PRINT TAB(Z);"*";
|
||||
1340 Z=Z+21
|
||||
1350 NEXT J
|
||||
1360 PRINT
|
||||
1370 NEXT K
|
||||
1380 RETURN
|
||||
1390 PRINT\PRINT "THANKS FOR THE GAME!"\PRINT\END
|
78
port/HANG.BAS
Normal file
78
port/HANG.BAS
Normal file
@ -0,0 +1,78 @@
|
||||
10 REM *** GAME OF HANGMAN BY DAVE AHL, DIGITAL
|
||||
15 REM *** BASED ON A PROGRAM WRITTEN BY KEN AUPPERLE, CLASS OF '75,
|
||||
20 REM *** HALF HOLLOW HILLS H.S., DIX HILLS, NY
|
||||
25 PRINT"GAME OF HANGMAN"\PRINT\PRINT
|
||||
30 DIM P$(12,12),L$(20),D$(20),N$(26),U(50),A(6)
|
||||
40 C=1\RANDOMIZE\N=27
|
||||
50 FOR I=1 TO 20\D$(I)="-"\NEXT I\M=0
|
||||
60 FOR I=1 TO 26\N$(I)=""\NEXT I
|
||||
70 FOR I=1 TO 12\FOR J=1 TO 12\P$(I,J)=" "\NEXT J\NEXT I
|
||||
80 FOR I=1 TO 12\P$(I,1)="X"\NEXT I
|
||||
90 FOR I=1 TO 7\P$(1,I)="X"\NEXT I\P$(2,7)="X"
|
||||
95 IF C<N THEN 100\PRINT "YOU DID ALL THE WORDS!!"\STOP
|
||||
100 Q=INT(N*RND(1)+1)
|
||||
110 IF U(Q)=1 THEN 100\U(Q)=1\C=C+1\RESTORE\T1=0
|
||||
150 FOR I=1 TO Q\READ A$\NEXT I
|
||||
155 CHANGE A$ TO A
|
||||
160 L=A(0)\A(0)=1\FOR I=1 TO L\A(1)=A(I)\CHANGE A TO L$(I)\NEXT I
|
||||
170 PRINT"HERE ARE THE LETTERS YOU USED:"
|
||||
180 FOR I=1 TO 26\PRINT N$(I);\IF N$(I+1)="" THEN 200
|
||||
190 PRINT ",";\NEXT I
|
||||
200 PRINT\PRINT\FOR I=1 TO L\PRINT D$(I);\NEXT I\PRINT\PRINT
|
||||
210 PRINT "WHAT IS YOUR GUESS";\INPUT G$\R=0
|
||||
220 FOR I=1 TO 26\IF N$(I)="" THEN 250
|
||||
230 IF G$<>N$(I) THEN 240\PRINT "YOU GUESSED THAT LETTER BEFORE!"\GOTO 170
|
||||
240 NEXT I\PRINT "PROGRAM ERROR. RUN AGAIN."\STOP
|
||||
250 N$(I)=G$\T1=T1+1
|
||||
260 FOR I=1 TO L\IF L$(I)=G$ THEN 280
|
||||
270 NEXT I\IF R=0 THEN 290\GOTO 300
|
||||
280 D$(I)=G$\R=R+1\GOTO 270
|
||||
290 M=M+1\GOTO 400
|
||||
300 FOR I=1 TO L\IF D$(I)="-" THEN 320
|
||||
310 NEXT I\GOTO 390
|
||||
320 PRINT\FOR I=1 TO L\PRINT D$(I);\NEXT I\PRINT\PRINT
|
||||
330 PRINT "WHAT IS YOUR GUESS FOR THE WORD";\INPUT B$
|
||||
340 IF B$=A$ THEN 360
|
||||
350 PRINT"WRONG. TRY ANOTHER LETTER."\PRINT\GOTO 170
|
||||
360 PRINT"RIGHT!! IT TOOK YOU"T1"GUESSES!"
|
||||
370 PRINT "WANT ANOTHER WORD";\INPUT W$\IF W$="YES" THEN 50
|
||||
380 PRINT\PRINT"IT'S BEEN FUN! BYE FOR NOW."\STOP
|
||||
390 PRINT"YOU FOUND THE WORD!"\GOTO 370
|
||||
400 PRINT\PRINT\PRINT"SORRY, THAT LETTER ISN'T IN THE WORD."
|
||||
410 ON M GOTO 415,420,425,430,435,440,445,450,455,460
|
||||
415 PRINT"FIRST, WE DRAW A HEAD"\GOTO 470
|
||||
420 PRINT"NOW WE DRAW A BODY"\GOTO 470
|
||||
425 PRINT"NEXT WE DRAW AN ARM"\GOTO 470
|
||||
430 PRINT"THIS TIME IT'S THE OTHER ARM"\GOTO 470
|
||||
435 PRINT"NOW, LET'S DRAW THE RIGHT LEG"\GOTO 470
|
||||
440 PRINT"THIS TIME WE DRAW THE LEFT LEG"\GOTO 470
|
||||
445 PRINT"NOW WE PUT UP A HAND"\GOTO 470
|
||||
450 PRINT"NEXT THE OTHER HAND"\GOTO 470
|
||||
455 PRINT"NOW WE DRAW ONE FOOT"\GOTO 470
|
||||
460 PRINT"HERE'S THE OTHER FOOT -- YOU'RE HUNG!!"
|
||||
470 ON M GOTO 480,490,500,510,520,530,540,550,560,570
|
||||
480 P$(3,6)="-"\P$(3,7)="-"\P$(3,8)="-"\P$(4,5)="("\P$(4,6)="."
|
||||
481 P$(4,8)="."\P$(4,9)=")"\P$(5,6)="-"\P$(5,7)="-"\P$(5,8)="-"\GOTO 580
|
||||
490 FOR I=6 TO 9\P$(I,7)="X"\NEXT I\GOTO 580
|
||||
500 FOR I=4 TO 7\P$(I,I-1)="\"\NEXT I\GOTO 580
|
||||
510 P$(4,11)="/"\P$(5,10)="/"\P$(6,9)="/"\P$(7,8)="/"\GOTO 580
|
||||
520 P$(10,6)="/"\P$(11,5)="/"\GOTO 580
|
||||
530 P$(10,8)="\"\P$(11,9)="\"\GOTO 580
|
||||
540 P$(3,11)="\"\GOTO 580
|
||||
550 P$(3,3)="/"\GOTO 580
|
||||
560 P$(12,10)="\"\P$(12,11)="-"\GOTO 580
|
||||
570 P$(12,3)="-"\P$(12,4)="/"
|
||||
580 FOR I=1 TO 12\FOR J=1 TO 12\PRINT P$(I,J);\NEXT J
|
||||
590 PRINT\NEXT I\PRINT\PRINT\IF M=10 THEN 600\GOTO 170
|
||||
600 PRINT"SORRY, YOU LOSE. THE WORD WAS "A$
|
||||
610 PRINT"YOU MISSED THAT ONE. DO YOU "\GOTO 370
|
||||
700 DATA "GUM","SIN","FOR","CRY","LUG","BYE","FLY"
|
||||
710 DATA "UGLY","EACH","FROM","WORK","TALK","WITH","SELF"
|
||||
720 DATA "PIZZA","THING","FEIGN","FIEND","ELBOW","FAULT","DIRTY"
|
||||
730 DATA "BUDGET","SPIRIT","QUAINT","MAIDEN","ESCORT","PICKAX"
|
||||
740 DATA "EXAMPLE","TENSION","QUININE","KIDNEY","REPLICA","SLEEPER"
|
||||
750 DATA "TRIANGLE","KANGAROO","MAHOGANY","SERGEANT","SEQUENCE"
|
||||
760 DATA "MOUSTACHE","DANGEROUS","SCIENTIST","DIFFERENT","QUIESCENT"
|
||||
770 DATA "MAGISTRATE","ERRONEOUSLY","LOUDSPEAKER","PHYTOTOXIC"
|
||||
780 DATA "MATRIMONIAL","PARASYMPATHOMIMETIC","THIGMOTROPISM"
|
||||
999 END
|
96
port/ORBIT.BAS
Normal file
96
port/ORBIT.BAS
Normal file
@ -0,0 +1,96 @@
|
||||
5 RANDOMIZE
|
||||
10 PRINT "SOMEWHERE ABOVE YOUR PLANET IS A ROMULAN SHIP."
|
||||
15 PRINT
|
||||
20 PRINT "THIS SHIP IS IN A CONSTANT POLAR ORBIT. IT'S"
|
||||
25 PRINT "DISTANCE FROM THE CENTER OF YOUR PLANET IS FROM"
|
||||
30 PRINT "10,000 TO 30,000 MILES AND AT IT'S PRESENT VELOCITY CAN"
|
||||
31 PRINT "CIRCLE YOUR PLANET ONCE EVERY 12 TO 36 HOURS."
|
||||
35 PRINT
|
||||
40 PRINT "UNFORTUNATELY THEY ARE USING A CLOAKING DEVICE SO"
|
||||
45 PRINT "YOU ARE UNABLE TO SEE THEM, BUT WITH A SPECIAL "
|
||||
50 PRINT "INSTRUMENT YOU CAN TELL HOW NEAR THEIR SHIP YOUR"
|
||||
55 PRINT "PHOTON BOMB EXPLODED. YOU HAVE SEVEN HOURS UNTIL THEY"
|
||||
60 PRINT "HAVE BUILT UP SUFFICIENT POWER IN ORDER TO ESCAPE "
|
||||
65 PRINT "YOUR PLANET'S GRAVITY."
|
||||
70 PRINT
|
||||
75 PRINT "YOUR PLANET HAS ENOUGH POWER TO FIRE ONE BOMB AN HOUR."
|
||||
80 PRINT
|
||||
85 PRINT "AT THE BEGINNING OF EACH HOUR YOU WILL BE ASKED TO GIVE AN"
|
||||
90 PRINT "ANGLE (BETWEEN 0 AND 360) AND A DISTANCE IN UNITS OF"
|
||||
95 PRINT "100 MILES (BETWEEN 100 AND 300), AFTER WHICH YOUR BOMB'S"
|
||||
100 PRINT "DISTANCE FROM THE ENEMY SHIP WILL BE GIVEN."
|
||||
105 PRINT
|
||||
110 PRINT "AN EXPLOSION WITHIN 5,000 MILES OF THE ROMULAN SHIP"
|
||||
111 PRINT "WILL DESTROY IT."
|
||||
114 PRINT
|
||||
115 PRINT "BELOW IS A DIAGRAM TO HELP YOU VISUALIZE YOUR PLIGHT."
|
||||
116 PRINT
|
||||
117 PRINT
|
||||
168 PRINT " 90"
|
||||
169 PRINT " ^"
|
||||
170 PRINT " 0000000000000"
|
||||
171 PRINT " 0000000000000000000"
|
||||
172 PRINT " 000000 000000"
|
||||
173 PRINT " 00000 00000"
|
||||
174 PRINT " 00000 XXXXXXXXXXX 00000"
|
||||
175 PRINT " 00000 XXXXXXXXXXXXX 00000"
|
||||
176 PRINT " 0000 XXXXXXXXXXXXXXX 0000"
|
||||
177 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000"
|
||||
178 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000"
|
||||
179 PRINT "180<== 00000 XXXXXXXXXXXXXXXXXXX 00000 ==>0"
|
||||
180 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000"
|
||||
181 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000"
|
||||
182 PRINT " 0000 XXXXXXXXXXXXXXX 0000"
|
||||
183 PRINT " 00000 XXXXXXXXXXXXX 00000"
|
||||
184 PRINT " 00000 XXXXXXXXXXX 00000"
|
||||
185 PRINT " 00000 00000"
|
||||
186 PRINT " 000000 000000"
|
||||
187 PRINT " 0000000000000000000"
|
||||
188 PRINT " 0000000000000"
|
||||
189 PRINT " !"
|
||||
190 PRINT " 270"
|
||||
192 PRINT
|
||||
195 PRINT "X - YOUR PLANET"
|
||||
196 PRINT "O - THE ORBIT OF THE ROMULAN SHIP"
|
||||
197 PRINT
|
||||
198 PRINT "ON THE ABOVE DIAGRAM, THE ROMULAN SHIP IS CIRCLING"
|
||||
199 PRINT "COUNTERCLOCKWISE AROUND YOUR PLANET. DON'T FORGET"
|
||||
200 PRINT "WITHOUT SUFFICIENT POWER THE ROMULAN SHIP'S ALTITUDE"
|
||||
210 PRINT "AND ORBITAL RATE WILL REMAIN CONSTANT."
|
||||
220 PRINT
|
||||
230 PRINT "GOOD LUCK. THE FEDERATION IS COUNTING ON YOU."
|
||||
270 LET A=INT(RND(1)*360)
|
||||
280 LET D=INT(RND(1)*200) +100
|
||||
290 LET R=INT(RND(1)*20) +10
|
||||
300 LET H=0
|
||||
310 IF H=7 GOTO 490
|
||||
320 LET H=H+1
|
||||
325 PRINT
|
||||
326 PRINT
|
||||
330 PRINT "HOUR";H;", AT WHAT ANGLE DO YOU WISH TO SEND"
|
||||
335 PRINT "YOUR PHOTON BOMB?"
|
||||
340 INPUT A1
|
||||
350 PRINT "HOW FAR OUT DO YOU WISH TO DETONATE IT?"
|
||||
360 INPUT D1
|
||||
365 PRINT
|
||||
366 PRINT
|
||||
370 LET A=A+R
|
||||
380 IF A<360 GOTO 400
|
||||
390 LET A=A-360
|
||||
400 LET T=ABS(A-A1)
|
||||
410 IF T<180 GOTO 430
|
||||
420 LET T=360-T
|
||||
430 LET C=SQR(D*D+D1*D1-2*D*D1*COS(T*3.14159/180))
|
||||
440 PRINT "YOUR PHOTON BOMB EXPLODED";C;"*10^2 MILES FROM THE"
|
||||
445 PRINT "ROMULAN SHIP"
|
||||
450 IF C<=50 GOTO 470
|
||||
460 GOTO 310
|
||||
470 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR MISSION."
|
||||
480 GOTO 500
|
||||
490 PRINT "YOU HAVE ALLOWED THE ROMULANS TO ESCAPE."
|
||||
500 PRINT "ANOTHER ROMULAN SHIP HAS GONE INTO ORBIT."
|
||||
510 PRINT "DO YOU WISH TO TRY TO DESTROY IT?"
|
||||
520 INPUT C$
|
||||
530 IF C$="YES" GOTO 270
|
||||
540 PRINT "PLEASE LOGOUT"
|
||||
999 END
|
Loading…
Reference in New Issue
Block a user