mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
Add EVEN, SLOTS and WAR-2.
This commit is contained in:
parent
707385e13e
commit
7f364ac4f1
124
dec/EVEN.BAS
Normal file
124
dec/EVEN.BAS
Normal file
@ -0,0 +1,124 @@
|
||||
1 LET Y1=0
|
||||
10 LET M1=0
|
||||
20 DIM M(20),Y(20)
|
||||
30 PRINT" THIS IS A TWO PERSON GAME CALLED 'EVEN WINS.'"
|
||||
40 PRINT"TO PLAY THE GAME, THE PLAYERS NEED 27 MARBLES OR"
|
||||
50 PRINT"OTHER OBJECTS ON A TABLE."
|
||||
60 PRINT
|
||||
70 PRINT
|
||||
80 PRINT" THE 2 PLAYERS ALTERNATE TURNS, WITH EACH PLAYER"
|
||||
90 PRINT"REMOVING FROM 1 TO 4 MARBLES ON EACH MOVE. THE GAME"
|
||||
100 PRINT"ENDS WHEN THERE ARE NO MARBLES LEFT, AND THE WINNER"
|
||||
110 PRINT"IS THE ONE WITH AN EVEN NUMBER OF MARBLES."
|
||||
120 PRINT
|
||||
130 PRINT
|
||||
140 PRINT" THE ONLY RULES ARE THAT (1) YOU MUST ALTERNATE TURNS,"
|
||||
150 PRINT"(2) YOU MUST TAKE BETWEEN 1 AND 4 MARBLES EACH TURN,"
|
||||
160 PRINT"AND (3) YOU CANNOT SKIP A TURN."
|
||||
170 PRINT
|
||||
180 PRINT
|
||||
190 PRINT
|
||||
200 PRINT" TYPE A 1 IF YOU WANT TO GO FIRST, AND TYPE"
|
||||
210 PRINT"A 0 IF YOU WANT ME TO GO FIRST"
|
||||
220 INPUT C
|
||||
230 IF C=0 THEN 250
|
||||
240 GOTO 1060
|
||||
250 LETT=27
|
||||
260 LET M=2
|
||||
270 PRINT"TOTAL =";T
|
||||
280 LET M1=M1+M
|
||||
290 LET T=T-M
|
||||
300 PRINT"I PICK UP";M;"MARBLES."
|
||||
310 IF T=0 THEN 880
|
||||
320 PRINT"TOTAL=";T
|
||||
330 PRINT""
|
||||
340 PRINT" AND WHAT IS YOUR NEXT MOVE, MY TOTAL IS";M1
|
||||
350 INPUT Y
|
||||
360 PRINT""
|
||||
370 IF Y<1 THEN 1160
|
||||
380 IF Y>4 THEN 1160
|
||||
390 IF Y<=T THEN 430
|
||||
400 PRINT" YOU HAVE TRIED TO TAKE MORE MARBLES THAN THERE ARE"
|
||||
410 PRINT"LEFT. TRY AGAIN."
|
||||
420 GOTO 350
|
||||
430 LET Y1=Y1+Y
|
||||
440 LET T=T-Y
|
||||
450 IF T=0 THEN 880
|
||||
460 PRINT"TOTAL =";T
|
||||
470 PRINT""
|
||||
480 PRINT" YOUR TOTAL IS ";Y1
|
||||
490 IF T<.5 THEN 880
|
||||
500 LET R=T-6*INT(T/6)
|
||||
510 IF INT(Y1/2)=Y1/2 THEN 700
|
||||
520 IF T<4.2 THEN 580
|
||||
530 IF R>3.4 THEN 620
|
||||
540 LET M=R+1
|
||||
550 LET M1=M1+M
|
||||
560 LET T=T-M
|
||||
570 GO TO 300
|
||||
580 LET M=T
|
||||
590 LET T=T-M
|
||||
600 GO TO 830
|
||||
610 REM 250 IS WHERE I WIN.
|
||||
620 IF R<4.7 THEN 660
|
||||
630 IF R>3.5 THEN 660
|
||||
640 LET M=1
|
||||
650 GOTO 670
|
||||
660 LET M=4
|
||||
670 LET T=T-M
|
||||
680 LET M1=M1+M
|
||||
690 GOTO 300
|
||||
700 REM I AM READY TO ENCODE THE STRAT FOR WHEN OPP TOT IS EVEN.
|
||||
710 IF R<1.5 THEN 1020
|
||||
720 IF R>5.3 THEN 1020
|
||||
730 LET M=R-1
|
||||
740 LET M1=M1+M
|
||||
750 LET T=T-M
|
||||
760 IF T<.2 THEN 790
|
||||
770 REM IS # ZERO HERE
|
||||
780 GOTO 300
|
||||
790 REM IS = ZERO HERE
|
||||
800 PRINT"I PICK UP";M;" MARBLES."
|
||||
810 PRINT""
|
||||
820 GOTO 880
|
||||
830 REM THIS IS WHERE I WIN
|
||||
840 PRINT "I PICK UP";M;" MARBLES."
|
||||
850 PRINT""
|
||||
860 PRINT "TOTAL = 0"
|
||||
870 LET M1=M1+M
|
||||
880 PRINT " THAT IS ALL OF THE MARBLES."
|
||||
890 PRINT""
|
||||
900 PRINT" MY TOTAL IS";M1;" YOUR TOTAL IS";Y1
|
||||
910 PRINT""
|
||||
920 IF INT(M1/2)=M1/2 THEN 950
|
||||
930 PRINT" YOU WON. DO YOU WANT TO PLAY"
|
||||
940 GOTO 960
|
||||
950 PRINT" I WON. DO YOU WANT TO PLAY"
|
||||
960 PRINT"AGAIN? TYPE 1 FOR YES AND 0 FOR NO."
|
||||
970 INPUT A1
|
||||
980 IF A1=0 THEN 1030
|
||||
990 LET M1=0
|
||||
1000 LET Y1=0
|
||||
1010 GOTO 200
|
||||
1020 GOTO 640
|
||||
1030 PRINT""
|
||||
1040 PRINT" OK. SEE YOU LATER."
|
||||
1050 GOTO 1230
|
||||
1060 LET T = 27
|
||||
1070 PRINT
|
||||
1080 PRINT
|
||||
1090 PRINT
|
||||
1100 PRINT"TOTAL =";T
|
||||
1110 PRINT
|
||||
1120 PRINT
|
||||
1130 PRINT" WHAT IS YOUR FIRST MOVE?"
|
||||
1140 INPUT Y
|
||||
1150 GOTO 360
|
||||
1160 PRINT
|
||||
1170 PRINT" THE NUMBER OF MARBLES YOU TAKE MUST BE A POSITIVE"
|
||||
1180 PRINT"INTEGER BETWEEN 1 AND 4."
|
||||
1190 PRINT
|
||||
1200 PRINT" WHAT IS YOUR NEXT MOVE?"
|
||||
1210 PRINT
|
||||
1220 GOTO 350
|
||||
1230 END
|
49
dec/SLOTS.BAS
Normal file
49
dec/SLOTS.BAS
Normal file
@ -0,0 +1,49 @@
|
||||
100 RANDOMIZE
|
||||
110 DIM D(3)
|
||||
120 PRINT"THIS IS A SIMULATION OF A SLOT MACHINE USING A COMPUTER "
|
||||
130 PRINT "EACH TIME YOU 'PULL' I WILL ASK YOU IF YOU WISH TO PLAY AGAIN."
|
||||
140 PRINT "JUST ANSWER WITH A 'Y' FOR YES OR A 'N' FOR NO."
|
||||
150 PRINT "PLEASE PLACE 4 QUARTERS ON MY CPU FOR EACH PLAY."
|
||||
160 PRINT
|
||||
170 FOR B1=1 TO 3
|
||||
180 LET D(B1)=INT(RND(0)*6)+1
|
||||
190 NEXT B1
|
||||
200 FOR G1=1 TO 3
|
||||
210 IF D(G1)=1 THEN 280
|
||||
220 IF D(G1)=2 THE N 300
|
||||
230 IF D(G1)=3 THEN 320
|
||||
240 IF D(G1)=4 THEN 340
|
||||
250 IF D(G1)=5 THEN 360
|
||||
260 IF D(G1)=6 THEN 380
|
||||
270 GOTO 580
|
||||
280 PRINT TAB(G1*7);" BELL";
|
||||
290 GOTO 390
|
||||
300 PRINT TAB(G1*7);" BAR";
|
||||
310 GOTO 390
|
||||
320 PRINT TAB(G1*7);"CHERRY";
|
||||
330 GOTO 390
|
||||
340 PRINT TAB(G1*7);"APPLE";
|
||||
350 GOTO 390
|
||||
360 PRINT TAB(G1*7);"LEMON";
|
||||
370 GOTO 390
|
||||
380 PRINT TAB(G1*7);" $";
|
||||
390 NEXT G1
|
||||
400 PRINT TAB(28);
|
||||
410 IF D(1)<>D(2) THEN 440
|
||||
420 IF D(2)=D(3) THEN 530
|
||||
430 IF D(1)=D(2) THEN 460
|
||||
440 IF D(1)<>D(3) THEN 490
|
||||
450 GO TO 510
|
||||
460 IF D(1)/2<>INT(D(1)/2) THEN 510
|
||||
470 LET B=B+5\PRINT "KENO..YOU WIN $5..TOTAL=$";B;
|
||||
480 GOTO 550
|
||||
490 LET B=B-1\PRINT "YOU HAVE LOST $1 -- TOTAL=$";B;
|
||||
500 GOTO 550
|
||||
510 LET B=B+1\PRINT "YOU HAVE WON $1 --- TOTAL=$";B;
|
||||
520 GOTO 550
|
||||
530 LET B=B+20\PRINT CHR$(7);"JACKPOT...$20...TOTAL=$";B;CHR$(7);
|
||||
540 GOTO 550
|
||||
550 PRINT "AGAIN?";
|
||||
560 INPUT $A\PRINT\IF A=#Y THEN 160\IF A<>#N THEN 560
|
||||
570 PRINT"IT'S BEEN NICE OPERATING FOR YOU COME BACK SOON!"
|
||||
580 END
|
123
dec/WAR-2.BAS
Normal file
123
dec/WAR-2.BAS
Normal file
@ -0,0 +1,123 @@
|
||||
1 REM BOB DORES/WAR
|
||||
2 PRI "I AM AT WAR WITH YOU."
|
||||
4 PRI "WE HAVE 72000 SOLDIERS A PIECE."
|
||||
5 PRI "DISTRIBUTE YOUR FORCES."
|
||||
6 PRI ,"ME","YOU"
|
||||
7 PRI"ARMY",30000,
|
||||
8 INPUT A
|
||||
9 PRI"NAVY",20000,
|
||||
10 INPUT B
|
||||
11 PRI"A.F.",22000,
|
||||
12 INPUT C
|
||||
13 IF A+B+C>72000 THE 5
|
||||
14 D=30000
|
||||
15 E=20000
|
||||
16 F=22000
|
||||
17 PRI "YOU ATTACK FIRST. TYPE 1 FOR ARMY 2 FOR NAVY"
|
||||
18 PRI "AND 3 FOR AIR FORCE."
|
||||
19 INPUT Y
|
||||
20 PRI "HOW MANY MEN"
|
||||
21 INPUT X
|
||||
22 IF X<0 THEN 20
|
||||
23 ON Y GOTO 100,200,300
|
||||
100 IF X>A THEN 20
|
||||
105 IF X<A/3 THEN 120
|
||||
110 IF X<2*A/3 THEN 150
|
||||
115 GOT 270
|
||||
120 PRI "YOU LOST "X" MEN FROM YOUR ARMY."
|
||||
125 A=INT(A-X)
|
||||
130 GOTO 500
|
||||
150 PRI"YOU LOST "INT(X/3)" MEN, BUT I LOST "INT(2*D/3)
|
||||
155 A=INT(A-X/3)
|
||||
160 D=0
|
||||
165 GOTO 500
|
||||
200 IF X>B THE 20
|
||||
210 IF X<E/3 THEN 230
|
||||
215 IF X<2*E/3 THEN 250
|
||||
220 GOT 270
|
||||
230 PRI "YOUR ATTACK WAS STOPPED!"
|
||||
232 B=INT(B-X)
|
||||
235 GOTO 500
|
||||
250 PRI "YOU DESTROYED "INT(2*E/3)" OF MY ARMY."
|
||||
255 E=INT(E/3)
|
||||
260 GOTO 500
|
||||
270 PRI"YOU SUNK 1 OF MY PATROL BOATS, BUT I WIPED OUT 2"
|
||||
275 PRI"OF YOUR A.F. BASES, AND 3 ARMY BASES."
|
||||
280 A=INT(A/3)
|
||||
285 C=INT(C/3)
|
||||
290 E=INT(2*E/3)
|
||||
293 GOTO 500
|
||||
300 IF X>C THEN 20
|
||||
310 IF X<C/3 THEN 350
|
||||
320 IF X<2*C/3 THEN 370
|
||||
330 GOT 380
|
||||
350 PRI "YOUR ATTACK WAS WIPED OUT."
|
||||
355 C=INT(C-X)
|
||||
360 GOTO 500
|
||||
370 PRI "WE HAD A DOGFIGHT- YOU WON - AND FINISHED YOUR MISSION."
|
||||
375 D=INT(2*D/3)
|
||||
377 E=INT(E/3)
|
||||
378 F=INT(F/3)
|
||||
379 GOT500
|
||||
380 PRI "YOU WIPED OUT ONE OF MY ARMY PATROLS, BUT I"
|
||||
381 PRI "DESTROYED 2 NAVY BASES, AND BOMBED 3 ARMY BASES."
|
||||
385 A=INT(A/4)
|
||||
387 B=INT(B/3)
|
||||
390 D=INT(2*D/3)
|
||||
500 PRI
|
||||
501 PRI,"YOU","ME"
|
||||
510 PRI"ARMY",A,D
|
||||
520 PRI"NAVY",B,E
|
||||
530 PRI"A.F.",C,F
|
||||
1000 PRI "WHAT IS YOUR NEXT MOVE?"
|
||||
1010 PRI "ARMY=1 NAVY=2 AIR FORCE=3"
|
||||
1020 INPUT G
|
||||
1030 PRI "HOW MANY MEN"
|
||||
1040 INPUT T
|
||||
1045 IF T<0 THE 1030
|
||||
1050 ON G GOTO 1600,1700,1800
|
||||
1600 IF T>A THE 1030
|
||||
1610 IF T<D/2 THE 1630
|
||||
1615 PRI"YOU DESTROYED MY ARMY!"
|
||||
1616 D=0
|
||||
1617 GOTO 2000
|
||||
1630 PRI "I WIPED OUT YOUR ATTACK"
|
||||
1635 A=A-T
|
||||
1640 GOT 2000
|
||||
1700 IF T>B THEN 1030
|
||||
1710 IF T<E/2 THEN 1750
|
||||
1720 GOT 1770
|
||||
1750 PRI "I SUNK 2 OF YOUR BATTLESHIPS, AND MY AIR FORCE"
|
||||
1751 PRI "WIPED OUT YOUR UNGUARDED CAPITOL."
|
||||
1755 A=A/4
|
||||
1760 B=B/2
|
||||
1765 GOTO 2000
|
||||
1770 PRI "YOUR NAVY SHOT DOWN 3 OF MY XIII PLANES ,"
|
||||
1771 PRI"AND SUNK 3 BATTLESHIPS."
|
||||
1775 F=2*F/3
|
||||
1780 E=(E/2)
|
||||
1790 GOTO2000
|
||||
1800 IF T>C THEN 1030
|
||||
1810 IF T>F/2 THEN 1830
|
||||
1820 GOT 1850
|
||||
1830 PRI "MY NAVY AND AIR FORCE IN A COMBINED ATTACK LEFT"
|
||||
1831 PRI "YOUR COUNTRY IN SHAMBLES."
|
||||
1835 A=A/3
|
||||
1837 B=B/3
|
||||
1840 C=C/3
|
||||
1845 GOTO 2000
|
||||
1850 PRI"ONE OF YOUR PLANES CRASHED INTO MY HOUSE. I AM DEAD."
|
||||
1851 PRI"MY COUNTRY FELL APART."
|
||||
1860 GOTO 2010
|
||||
2000 PRI
|
||||
2001 PRI "FROM THE RESULTS OF BOTH OF YOUR ATTACKS,"
|
||||
2002 IF A+B+C>3/2*(D+E+F) THE 2010
|
||||
2005 IF A+B+C<2/3*(D+E+F) THE 2015
|
||||
2006 PRI"THE TREATY OF PARIS CONCLUDED THAT WE TAKE OUR"
|
||||
2007 PRI"RESPECTIVE COUNTRIES, AND LIVE IN PEACE."
|
||||
2008 GOT2020
|
||||
2010 PRI "YOU WON, OH! SHUCKS!!!!!"
|
||||
2012 GOTO 2020
|
||||
2015 PRI "YOU LOST-I CONQUERED YOUR COUNTRY. IT SERVES YOU"
|
||||
2016 PRI "RIGHT FOR PLAYING THIS STUPID GAME!!!"
|
||||
2020 END
|
124
port/EVEN.BAS
Normal file
124
port/EVEN.BAS
Normal file
@ -0,0 +1,124 @@
|
||||
1 LET Y1=0
|
||||
10 LET M1=0
|
||||
20 DIM M(20),Y(20)
|
||||
30 PRINT" THIS IS A TWO PERSON GAME CALLED 'EVEN WINS.'"
|
||||
40 PRINT"TO PLAY THE GAME, THE PLAYERS NEED 27 MARBLES OR"
|
||||
50 PRINT"OTHER OBJECTS ON A TABLE."
|
||||
60 PRINT
|
||||
70 PRINT
|
||||
80 PRINT" THE 2 PLAYERS ALTERNATE TURNS, WITH EACH PLAYER"
|
||||
90 PRINT"REMOVING FROM 1 TO 4 MARBLES ON EACH MOVE. THE GAME"
|
||||
100 PRINT"ENDS WHEN THERE ARE NO MARBLES LEFT, AND THE WINNER"
|
||||
110 PRINT"IS THE ONE WITH AN EVEN NUMBER OF MARBLES."
|
||||
120 PRINT
|
||||
130 PRINT
|
||||
140 PRINT" THE ONLY RULES ARE THAT (1) YOU MUST ALTERNATE TURNS,"
|
||||
150 PRINT"(2) YOU MUST TAKE BETWEEN 1 AND 4 MARBLES EACH TURN,"
|
||||
160 PRINT"AND (3) YOU CANNOT SKIP A TURN."
|
||||
170 PRINT
|
||||
180 PRINT
|
||||
190 PRINT
|
||||
200 PRINT" TYPE A 1 IF YOU WANT TO GO FIRST, AND TYPE"
|
||||
210 PRINT"A 0 IF YOU WANT ME TO GO FIRST"
|
||||
220 INPUT C
|
||||
230 IF C=0 THEN 250
|
||||
240 GOTO 1060
|
||||
250 LETT=27
|
||||
260 LET M=2
|
||||
270 PRINT"TOTAL =";T
|
||||
280 LET M1=M1+M
|
||||
290 LET T=T-M
|
||||
300 PRINT"I PICK UP";M;"MARBLES."
|
||||
310 IF T=0 THEN 880
|
||||
320 PRINT"TOTAL=";T
|
||||
330 PRINT""
|
||||
340 PRINT" AND WHAT IS YOUR NEXT MOVE, MY TOTAL IS";M1
|
||||
350 INPUT Y
|
||||
360 PRINT""
|
||||
370 IF Y<1 THEN 1160
|
||||
380 IF Y>4 THEN 1160
|
||||
390 IF Y<=T THEN 430
|
||||
400 PRINT" YOU HAVE TRIED TO TAKE MORE MARBLES THAN THERE ARE"
|
||||
410 PRINT"LEFT. TRY AGAIN."
|
||||
420 GOTO 350
|
||||
430 LET Y1=Y1+Y
|
||||
440 LET T=T-Y
|
||||
450 IF T=0 THEN 880
|
||||
460 PRINT"TOTAL =";T
|
||||
470 PRINT""
|
||||
480 PRINT" YOUR TOTAL IS ";Y1
|
||||
490 IF T<.5 THEN 880
|
||||
500 LET R=T-6*INT(T/6)
|
||||
510 IF INT(Y1/2)=Y1/2 THEN 700
|
||||
520 IF T<4.2 THEN 580
|
||||
530 IF R>3.4 THEN 620
|
||||
540 LET M=R+1
|
||||
550 LET M1=M1+M
|
||||
560 LET T=T-M
|
||||
570 GO TO 300
|
||||
580 LET M=T
|
||||
590 LET T=T-M
|
||||
600 GO TO 830
|
||||
610 REM 250 IS WHERE I WIN.
|
||||
620 IF R<4.7 THEN 660
|
||||
630 IF R>3.5 THEN 660
|
||||
640 LET M=1
|
||||
650 GOTO 670
|
||||
660 LET M=4
|
||||
670 LET T=T-M
|
||||
680 LET M1=M1+M
|
||||
690 GOTO 300
|
||||
700 REM I AM READY TO ENCODE THE STRAT FOR WHEN OPP TOT IS EVEN.
|
||||
710 IF R<1.5 THEN 1020
|
||||
720 IF R>5.3 THEN 1020
|
||||
730 LET M=R-1
|
||||
740 LET M1=M1+M
|
||||
750 LET T=T-M
|
||||
760 IF T<.2 THEN 790
|
||||
770 REM IS # ZERO HERE
|
||||
780 GOTO 300
|
||||
790 REM IS = ZERO HERE
|
||||
800 PRINT"I PICK UP";M;" MARBLES."
|
||||
810 PRINT""
|
||||
820 GOTO 880
|
||||
830 REM THIS IS WHERE I WIN
|
||||
840 PRINT "I PICK UP";M;" MARBLES."
|
||||
850 PRINT""
|
||||
860 PRINT "TOTAL = 0"
|
||||
870 LET M1=M1+M
|
||||
880 PRINT " THAT IS ALL OF THE MARBLES."
|
||||
890 PRINT""
|
||||
900 PRINT" MY TOTAL IS";M1;" YOUR TOTAL IS";Y1
|
||||
910 PRINT""
|
||||
920 IF INT(M1/2)=M1/2 THEN 950
|
||||
930 PRINT" YOU WON. DO YOU WANT TO PLAY"
|
||||
940 GOTO 960
|
||||
950 PRINT" I WON. DO YOU WANT TO PLAY"
|
||||
960 PRINT"AGAIN? TYPE 1 FOR YES AND 0 FOR NO."
|
||||
970 INPUT A1
|
||||
980 IF A1=0 THEN 1030
|
||||
990 LET M1=0
|
||||
1000 LET Y1=0
|
||||
1010 GOTO 200
|
||||
1020 GOTO 640
|
||||
1030 PRINT""
|
||||
1040 PRINT" OK. SEE YOU LATER."
|
||||
1050 GOTO 1230
|
||||
1060 LET T = 27
|
||||
1070 PRINT
|
||||
1080 PRINT
|
||||
1090 PRINT
|
||||
1100 PRINT"TOTAL =";T
|
||||
1110 PRINT
|
||||
1120 PRINT
|
||||
1130 PRINT" WHAT IS YOUR FIRST MOVE?"
|
||||
1140 INPUT Y
|
||||
1150 GOTO 360
|
||||
1160 PRINT
|
||||
1170 PRINT" THE NUMBER OF MARBLES YOU TAKE MUST BE A POSITIVE"
|
||||
1180 PRINT"INTEGER BETWEEN 1 AND 4."
|
||||
1190 PRINT
|
||||
1200 PRINT" WHAT IS YOUR NEXT MOVE?"
|
||||
1210 PRINT
|
||||
1220 GOTO 350
|
||||
1230 END
|
49
port/SLOTS.BAS
Normal file
49
port/SLOTS.BAS
Normal file
@ -0,0 +1,49 @@
|
||||
100 RANDOMIZE
|
||||
110 DIM D(3)
|
||||
120 PRINT"THIS IS A SIMULATION OF A SLOT MACHINE USING A COMPUTER "
|
||||
130 PRINT "EACH TIME YOU 'PULL' I WILL ASK YOU IF YOU WISH TO PLAY AGAIN."
|
||||
140 PRINT "JUST ANSWER WITH A 'Y' FOR YES OR A 'N' FOR NO."
|
||||
150 PRINT "PLEASE PLACE 4 QUARTERS ON MY CPU FOR EACH PLAY."
|
||||
160 PRINT
|
||||
170 FOR B1=1 TO 3
|
||||
180 LET D(B1)=INT(RND(0)*6)+1
|
||||
190 NEXT B1
|
||||
200 FOR G1=1 TO 3
|
||||
210 IF D(G1)=1 THEN 280
|
||||
220 IF D(G1)=2 THE N 300
|
||||
230 IF D(G1)=3 THEN 320
|
||||
240 IF D(G1)=4 THEN 340
|
||||
250 IF D(G1)=5 THEN 360
|
||||
260 IF D(G1)=6 THEN 380
|
||||
270 GOTO 580
|
||||
280 PRINT TAB(G1*7);" BELL";
|
||||
290 GOTO 390
|
||||
300 PRINT TAB(G1*7);" BAR";
|
||||
310 GOTO 390
|
||||
320 PRINT TAB(G1*7);"CHERRY";
|
||||
330 GOTO 390
|
||||
340 PRINT TAB(G1*7);"APPLE";
|
||||
350 GOTO 390
|
||||
360 PRINT TAB(G1*7);"LEMON";
|
||||
370 GOTO 390
|
||||
380 PRINT TAB(G1*7);" $";
|
||||
390 NEXT G1
|
||||
400 PRINT TAB(28);
|
||||
410 IF D(1)<>D(2) THEN 440
|
||||
420 IF D(2)=D(3) THEN 530
|
||||
430 IF D(1)=D(2) THEN 460
|
||||
440 IF D(1)<>D(3) THEN 490
|
||||
450 GO TO 510
|
||||
460 IF D(1)/2<>INT(D(1)/2) THEN 510
|
||||
470 LET B=B+5\PRINT "KENO..YOU WIN $5..TOTAL=$";B;
|
||||
480 GOTO 550
|
||||
490 LET B=B-1\PRINT "YOU HAVE LOST $1 -- TOTAL=$";B;
|
||||
500 GOTO 550
|
||||
510 LET B=B+1\PRINT "YOU HAVE WON $1 --- TOTAL=$";B;
|
||||
520 GOTO 550
|
||||
530 LET B=B+20\PRINT CHR$(7);"JACKPOT...$20...TOTAL=$";B;CHR$(7);
|
||||
540 GOTO 550
|
||||
550 PRINT "AGAIN";
|
||||
560 INPUT A$\IF A$="Y" THEN 160\IF A$<>"N" THEN 560
|
||||
570 PRINT"IT'S BEEN NICE OPERATING FOR YOU COME BACK SOON!"
|
||||
580 END
|
123
port/WAR-2.BAS
Normal file
123
port/WAR-2.BAS
Normal file
@ -0,0 +1,123 @@
|
||||
1 REM BOB DORES/WAR
|
||||
2 PRINT "I AM AT WAR WITH YOU."
|
||||
4 PRINT "WE HAVE 72000 SOLDIERS A PIECE."
|
||||
5 PRINT "DISTRIBUTE YOUR FORCES."
|
||||
6 PRINT " ","ME","YOU"
|
||||
7 PRINT"ARMY",30000,
|
||||
8 INPUT A
|
||||
9 PRINT"NAVY",20000,
|
||||
10 INPUT B
|
||||
11 PRINT"A.F.",22000,
|
||||
12 INPUT C
|
||||
13 IF A+B+C>72000 THEN 5
|
||||
14 D=30000
|
||||
15 E=20000
|
||||
16 F=22000
|
||||
17 PRINT "YOU ATTACK FIRST. TYPE 1 FOR ARMY 2 FOR NAVY"
|
||||
18 PRINT "AND 3 FOR AIR FORCE."
|
||||
19 INPUT Y
|
||||
20 PRINT "HOW MANY MEN"
|
||||
21 INPUT X
|
||||
22 IF X<0 THEN 20
|
||||
23 ON Y GOTO 100,200,300
|
||||
100 IF X>A THEN 20
|
||||
105 IF X<A/3 THEN 120
|
||||
110 IF X<2*A/3 THEN 150
|
||||
115 GOTO 270
|
||||
120 PRINT "YOU LOST "X" MEN FROM YOUR ARMY."
|
||||
125 A=INT(A-X)
|
||||
130 GOTO 500
|
||||
150 PRINT"YOU LOST "INT(X/3)" MEN, BUT I LOST "INT(2*D/3)
|
||||
155 A=INT(A-X/3)
|
||||
160 D=0
|
||||
165 GOTO 500
|
||||
200 IF X>B THEN 20
|
||||
210 IF X<E/3 THEN 230
|
||||
215 IF X<2*E/3 THEN 250
|
||||
220 GOTO 270
|
||||
230 PRINT "YOUR ATTACK WAS STOPPED!"
|
||||
232 B=INT(B-X)
|
||||
235 GOTO 500
|
||||
250 PRINT "YOU DESTROYED "INT(2*E/3)" OF MY ARMY."
|
||||
255 E=INT(E/3)
|
||||
260 GOTO 500
|
||||
270 PRINT"YOU SUNK 1 OF MY PATROL BOATS, BUT I WIPED OUT 2"
|
||||
275 PRINT"OF YOUR A.F. BASES, AND 3 ARMY BASES."
|
||||
280 A=INT(A/3)
|
||||
285 C=INT(C/3)
|
||||
290 E=INT(2*E/3)
|
||||
293 GOTO 500
|
||||
300 IF X>C THEN 20
|
||||
310 IF X<C/3 THEN 350
|
||||
320 IF X<2*C/3 THEN 370
|
||||
330 GOTO 380
|
||||
350 PRINT "YOUR ATTACK WAS WIPED OUT."
|
||||
355 C=INT(C-X)
|
||||
360 GOTO 500
|
||||
370 PRINT "WE HAD A DOGFIGHT- YOU WON - AND FINISHED YOUR MISSION."
|
||||
375 D=INT(2*D/3)
|
||||
377 E=INT(E/3)
|
||||
378 F=INT(F/3)
|
||||
379 GOTO500
|
||||
380 PRINT "YOU WIPED OUT ONE OF MY ARMY PATROLS, BUT I"
|
||||
381 PRINT "DESTROYED 2 NAVY BASES, AND BOMBED 3 ARMY BASES."
|
||||
385 A=INT(A/4)
|
||||
387 B=INT(B/3)
|
||||
390 D=INT(2*D/3)
|
||||
500 PRINT
|
||||
501 PRINT" ","YOU","ME"
|
||||
510 PRINT"ARMY",A,D
|
||||
520 PRINT"NAVY",B,E
|
||||
530 PRINT"A.F.",C,F
|
||||
1000 PRINT "WHAT IS YOUR NEXT MOVE?"
|
||||
1010 PRINT "ARMY=1 NAVY=2 AIR FORCE=3"
|
||||
1020 INPUT G
|
||||
1030 PRINT "HOW MANY MEN"
|
||||
1040 INPUT T
|
||||
1045 IF T<0 THEN 1030
|
||||
1050 ON G GOTO 1600,1700,1800
|
||||
1600 IF T>A THEN 1030
|
||||
1610 IF T<D/2 THEN 1630
|
||||
1615 PRINT"YOU DESTROYED MY ARMY!"
|
||||
1616 D=0
|
||||
1617 GOTO 2000
|
||||
1630 PRINT "I WIPED OUT YOUR ATTACK"
|
||||
1635 A=A-T
|
||||
1640 GOTO 2000
|
||||
1700 IF T>B THEN 1030
|
||||
1710 IF T<E/2 THEN 1750
|
||||
1720 GOTO 1770
|
||||
1750 PRINT "I SUNK 2 OF YOUR BATTLESHIPS, AND MY AIR FORCE"
|
||||
1751 PRINT "WIPED OUT YOUR UNGUARDED CAPITOL."
|
||||
1755 A=A/4
|
||||
1760 B=B/2
|
||||
1765 GOTO 2000
|
||||
1770 PRINT "YOUR NAVY SHOT DOWN 3 OF MY XIII PLANES ,"
|
||||
1771 PRINT"AND SUNK 3 BATTLESHIPS."
|
||||
1775 F=2*F/3
|
||||
1780 E=(E/2)
|
||||
1790 GOTO2000
|
||||
1800 IF T>C THEN 1030
|
||||
1810 IF T>F/2 THEN 1830
|
||||
1820 GOTO 1850
|
||||
1830 PRINT "MY NAVY AND AIR FORCE IN A COMBINED ATTACK LEFT"
|
||||
1831 PRINT "YOUR COUNTRY IN SHAMBLES."
|
||||
1835 A=A/3
|
||||
1837 B=B/3
|
||||
1840 C=C/3
|
||||
1845 GOTO 2000
|
||||
1850 PRINT"ONE OF YOUR PLANES CRASHED INTO MY HOUSE. I AM DEAD."
|
||||
1851 PRINT"MY COUNTRY FELL APART."
|
||||
1860 GOTO 2010
|
||||
2000 PRINT
|
||||
2001 PRINT "FROM THE RESULTS OF BOTH OF YOUR ATTACKS,"
|
||||
2002 IF A+B+C>3/2*(D+E+F) THEN 2010
|
||||
2005 IF A+B+C<2/3*(D+E+F) THEN 2015
|
||||
2006 PRINT"THE TREATY OF PARIS CONCLUDED THAT WE TAKE OUR"
|
||||
2007 PRINT"RESPECTIVE COUNTRIES, AND LIVE IN PEACE."
|
||||
2008 GOTO2020
|
||||
2010 PRINT "YOU WON, OH! SHUCKS!!!!!"
|
||||
2012 GOTO 2020
|
||||
2015 PRINT "YOU LOST-I CONQUERED YOUR COUNTRY. IT SERVES YOU"
|
||||
2016 PRINT "RIGHT FOR PLAYING THIS STUPID GAME!!!"
|
||||
2020 END
|
Loading…
Reference in New Issue
Block a user