mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-17 23:56:24 -05:00
Add CIVILW and MNOPLY (file creation part).
This commit is contained in:
parent
29b448e9bb
commit
0aa588a35b
239
dec/CIVILW.BAS
Normal file
239
dec/CIVILW.BAS
Normal file
@ -0,0 +1,239 @@
|
||||
1 LET L=0:LET W=0:LET R1=0:LET P1=0
|
||||
2 LET Q1=0:LET M3=0:LET M4=0
|
||||
3 LET P2=0:LET T1=0:LET T2=0
|
||||
5 REMARKABLE PROGRAM BY L. CRAM , L. GOODIE , AND D. HIBBARD
|
||||
6 PRINT "DO YOU WANT DESCRIPTIONS (0=YES, 1=NO)";
|
||||
7 INPUT Z
|
||||
9 FOR U=1 TO 6
|
||||
10 PRINT
|
||||
11 NEXT U
|
||||
13 IF Z=1 THEN 100
|
||||
15 PRINT "THIS IS A CIVIL WAR SIMULATION."
|
||||
20 PRINT "TO PLAY, TYPE A RESPONSE WHEN THE COMPUTER ASKS."
|
||||
30 PRINT "REMEMBER THAT ALL FACTORS ARE INTERRELATED AND THAT YOUR"
|
||||
35 PRINT "RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE"
|
||||
40 PRINT "BASED ON THE ACTUAL OCCURENCE. MOST BATTLES TEND TO RESULT"
|
||||
45 PRINT "AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!"
|
||||
50 PRINT
|
||||
51 PRINT "THE OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS POSSIBLE"
|
||||
52 PRINT
|
||||
55 PRINT "YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:"
|
||||
60 PRINT " (1) ARTILLERY ATTACK"
|
||||
65 PRINT " (2) FORTIFICATION AGAINST FRONTAL ATTACK"
|
||||
70 PRINT " (3) FORTIFICATION AGAINST FLANKING MANUEVERS"
|
||||
75 PRINT " (4) FALLING BACK"
|
||||
80 PRINT "YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:"
|
||||
85 PRINT " (1) ARTILLERY ATTACK"
|
||||
90 PRINT " (2) FRONTAL ATTACK"
|
||||
95 PRINT " (3) FLANKING MANUEVERS"
|
||||
96 PRINT " (4) ENCIRCLEMENT"
|
||||
97 PRINT "YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY."
|
||||
98 PRINT
|
||||
99 PRINT "YOU ARE THE CONFEDERACY. GOOD LUCK!"
|
||||
100 READ M1,M2,C1,C2,M,A,U
|
||||
101 LET I1=10+(L-W)*2
|
||||
102 LET I2=10+(W-L)*2
|
||||
103 LET D1=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+0.5)
|
||||
104 LET D2=100*INT(M2*(100-I2)/2000+0.5)
|
||||
105 LET F1=5*M1/6
|
||||
106 LET A1=Z
|
||||
107 FOR U=1 TO 4
|
||||
108 PRINT
|
||||
109 NEXT U
|
||||
110 PRINT "THIS IS THE BATTLE OF ";
|
||||
115 GOSUB 800
|
||||
120 PRINT " ","CONFEDERACY"," UNION"
|
||||
130 PRINT "MEN"," ";INT(M1*(1+(P1-T1)/(M3+1)))," ";
|
||||
131 PRINT INT(M2*(1+(P2-T2)/(M4+1)))
|
||||
140 PRINT "MONEY","$";D1,"$";D2
|
||||
150 PRINT "INFLATION"," ";I1+15;"%"," ";I2;"%"
|
||||
160 PRINT
|
||||
170 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR FOOD";
|
||||
180 INPUT F
|
||||
185 IF F<0 THEN 750
|
||||
190 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR SALARIES";
|
||||
200 INPUT S
|
||||
205 IF S<0 THEN 750
|
||||
210 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR AMMUNITION";
|
||||
220 INPUT B
|
||||
221 IF B<0 THEN 750
|
||||
222 PRINT
|
||||
224 IF F+S+B<=D1 THEN 230
|
||||
226 PRINT "THINK AGAIN! YOU HAVE ONLY $" D1
|
||||
228 GOTO 160
|
||||
230 LET O=((2*F^2+S^2)/F1^2+1)
|
||||
235 IF O<10 THEN 260
|
||||
240 PRINT "MORALE IS HIGH"
|
||||
250 GOTO 300
|
||||
260 IF O<5 THEN 290
|
||||
270 PRINT "MORALE IS FAIR"
|
||||
280 GOTO 300
|
||||
290 PRINT "MORALE IS POOR"
|
||||
300 IF M<>3 THEN 330
|
||||
310 PRINT "YOU ARE ON THE OFFENSIVE"
|
||||
320 GOTO 370
|
||||
330 IF M<>1 THEN 360
|
||||
340 PRINT "YOU ARE ON THE DEFENSIVE"
|
||||
350 GOTO 370
|
||||
360 PRINT "BOTH SIDES ARE ON THE OFFENSIVE"
|
||||
370 PRINT
|
||||
380 PRINT "YOUR STEGY";
|
||||
390 INPUT Y
|
||||
391 IF Y=5 THEN 1487
|
||||
392 IF ABS(Y-3)<3 THEN 395
|
||||
393 PRINT "YOU JERK! USE THE OTHER SET OF STRATEGIES!!"
|
||||
394 GOTO 370
|
||||
395 PRINT
|
||||
400 PRINT " ","CONFEDERACY","UNION"
|
||||
410 LET C5=(2*C1/5)*(1+1/(2*(ABS(INT(4*RND(1)+1)-Y)+1)))
|
||||
412 LET C5=INT(C5*(1+1/O)*(1.28+F1/(B+1))+0.5)
|
||||
414 IF C5+100/O<M1*(1+(P1-T1)/(M3+1)) THEN 424
|
||||
416 LET C5=INT(13*M1/20*(1+(P1-T1)/(M3+1)))
|
||||
418 LET E=7*C5/13
|
||||
420 LET U=1
|
||||
422 GOTO 426
|
||||
424 LET E=100/O
|
||||
426 PRINT "CASUALTIES",C5,INT(17*C2*C1/(C5*20)+0.5)
|
||||
430 PRINT "DESERTIONS",INT(E),INT(5*O)
|
||||
432 PRINT
|
||||
433 IF C5-C1>=0 THEN 439
|
||||
435 PRINT "YOUR CASUALTIES WERE"INT(100*(C1-C5)/C1+0.5);"% LESS THAN"
|
||||
437 GOTO 441
|
||||
439 PRINT "YOUR CASUALTIES WERE"INT(100*(C5-C1)/C1+0.5);"% MORE THAN"
|
||||
441 PRINT "THE ACTUAL CASUALITIES AT ";
|
||||
443 LET A1=1
|
||||
445 GO SUB800
|
||||
450 IF U=1 THEN 470
|
||||
460 IF C5+E<17*C2*C1/(C5*20)+5*O THEN 490
|
||||
470 PRINT "YOU LOSE ";
|
||||
471 LET L=L+1
|
||||
480 GOTO 555
|
||||
490 PRINT "YOU WIN ";
|
||||
491 LET W=W+1
|
||||
555 GOSUB 800
|
||||
556 IF W=8 THEN 1490
|
||||
580 LET T1=T1+C5+E
|
||||
590 LET T2=T2+17*C2*C1/(C5*20)+5*O
|
||||
600 LET P1=P1+C1
|
||||
610 LET P2=P2+C2
|
||||
620 LET Q1=Q1+(F+S+B)
|
||||
630 LET R1=R1+M1*(100-I1)/20
|
||||
635 LETM3=M3+M1
|
||||
637 LET M4=M4+M2
|
||||
650 IF A=14 THEN 1500
|
||||
660 GOTO 100
|
||||
670 DATA 18000,18500,1967,2708,1,1,0
|
||||
672 DATA 40000,44894,10699,13047,3,2,0
|
||||
674 DATA 95000,115000,20614,15849,3,3,0
|
||||
676 DATA 54000,63000,10000,14000,2,4,0
|
||||
678 DATA 40000,50000,10000,12000,3,5,0
|
||||
680 DATA 75000,120000,5377,12653,1,6,0
|
||||
682 DATA 38000,45000,11000,12000,1,7,0
|
||||
684 DATA 32000,90000,13000,17197,2,8,0
|
||||
686 DATA 50000,70000,12000,19000,1,9,0
|
||||
688 DATA 72500,85000,20000,23000,3,10,0
|
||||
690 DATA 66000,60000,18000,16000,2,11,0
|
||||
692 DATA 37000,60000,6700,5800,2,12,0
|
||||
694 DATA 62000,110000,17723,18000,2,13,0
|
||||
696 DATA 65000,100000,8500,3700,1,14,0
|
||||
750 PRINT "GO TO JAIL."
|
||||
752 PRINT "GO DIRECTLY TO JAIL."
|
||||
754 PRINT "DO NOT PASS GO."
|
||||
756 PRINT "DO NOT COLLECT $200"
|
||||
758 GOTO 107
|
||||
800 IF A<>1 THEN 850
|
||||
810 PRINT "BULL RUN"
|
||||
820 IF A1=1 THEN 1480
|
||||
830PRINT"JULY 21,1861 GEN. BEAUREGARD COMMANDING THE SOUTH MET THE"
|
||||
832PRINT"UNION FORCES WITH GEN MCDOWELL IN A PREMATURE BATTLE AT BULL"
|
||||
834PRINT"RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."
|
||||
840 GO TO 1480
|
||||
850 IF A<>2 THEN 900
|
||||
860 PRINT "SHILOH"
|
||||
870 IF A1=1 THEN 1480
|
||||
880PRINT"APRIL 6-7,1862 THE CONFEDERATE SURPRISE ATTACK AT SHILOH"
|
||||
882PRINT"FAILED DUE TO POOR ORGANIZATION."
|
||||
890 GO TO 1480
|
||||
900 IF A<>3 THEN 950
|
||||
910 PRINT "SEVEN DAYS"
|
||||
920 IF A1=1 THEN 1480
|
||||
930PRINT"JUNE 25-JULY 1,1862 GENERAL LEE (CSA) UPHELD THE OFFENSIVE"
|
||||
932PRINT"THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN AND THE UNION"
|
||||
934PRINT"FORCES AWAY FROM RICHMOND."
|
||||
940 GO TO 1480
|
||||
950 IF A<>4 THEN 1000
|
||||
960 PRINT "THE SECOND BULL RUN"
|
||||
970 IF A1=1 THEN 1480
|
||||
980PRINT"AUG 29-30,1862 THE COMBINED CONFEDERATE FORCES UNDER LEE AND"
|
||||
982PRINT"JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."
|
||||
990 GO TO 1480
|
||||
1000 IF A<>5 THEN 1050
|
||||
1010 PRINT "ANTIETAM"
|
||||
1020 IF A1=1 THEN 1480
|
||||
1030PRINT"SEPT 17,1862 THE SOUTH FAILED TO INCORPORATE MARYLAND INTO"
|
||||
1032PRINT"THE CONFEDERACY."
|
||||
1040 GO TO 1480
|
||||
1050 IF A<>6 THEN 1100
|
||||
1060 PRINT "FREDERICKSBURG"
|
||||
1070 IF A1=1 THEN 1480
|
||||
1080PRINT"DEC 13,1862 THE CONFEDERACY UNDER LEE SUCESSFULLY REPULSED"
|
||||
1082PRINT"AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."
|
||||
1090 GOTO 1480
|
||||
1100 IF A <>7 THEN 1150
|
||||
1110 PRINT "MURFREESBORO"
|
||||
1120 IF A1=1 THEN 1480
|
||||
1130PRINT"DEC 31,1862 THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE"
|
||||
1140 GOTO 1480
|
||||
1150 IF A<>8 THEN 1200
|
||||
1160 PRINT "CHANCELLORSVILLE"
|
||||
1170 IF A1=1 THEN 1480
|
||||
1180PRINT"MAY 1-6,1863 THE SOUTH HAD A COSTLY VICTORY AND LOST ONE"
|
||||
1182PRINT"OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."
|
||||
1190 GOTO 1480
|
||||
1200 IF A<>9 THEN 1250
|
||||
1210 PRINT "VICKSBURG"
|
||||
1220 IF A1=1 THEN 1480
|
||||
1230PRINT"JULY 4,1863 VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH"
|
||||
1232PRINT"BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."
|
||||
1240 GOTO 1480
|
||||
1250 IF A<>10 THEN 1300
|
||||
1260 PRINT "GETTYSBURG"
|
||||
1270 IF A1=1 THEN 1480
|
||||
1280PRINT"JUNE 30,1863 A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG"
|
||||
1282PRINT"COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THR WAR."
|
||||
1290 GOTO 1480
|
||||
1300 IF A<>11 THEN 1350
|
||||
1310 PRINT "CHICKAMAUGA"
|
||||
1320 IF A1=1 THEN 1480
|
||||
1330PRINT"NOV 25,1863 AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'"
|
||||
1332PRINT"ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."
|
||||
1340 GOTO 1480
|
||||
1350 IF A<>12 THEN 1400
|
||||
1360 PRINT "CHATTANOOGA"
|
||||
1370 IF A1=1 THEN 1480
|
||||
1380PRINT"SEPT 15,1863 CONFUSION IN A FOREST NEAR CHICKAMAUGA LED"
|
||||
1382PRINT"TO A COSTLY SOUTHERN VICTORY."
|
||||
1390 GOTO 1480
|
||||
1400 IF A<>13 THEN 1450
|
||||
1410 PRINT "SPOTSYLVANIA"
|
||||
1420 IF A1=1 THEN 1480
|
||||
1430PRINT"MAY 5,1864 GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO FAIL"
|
||||
1432PRINT"HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."
|
||||
1440 GOTO 1480
|
||||
1450 PRINT "ATLANTA"
|
||||
1460 IF A1=1 THEN 1480
|
||||
1470PRINT"AUGUST, 1864 SHERMAN AND THREE VETERAN ARMIES CONVERGED ON"
|
||||
1472PRINT"ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."
|
||||
1480 PRINT
|
||||
1485 RETURN
|
||||
1487 PRINT "THE CONFEDERACY HAS SURRENDERED"
|
||||
1488 GOTO 1500
|
||||
1490 PRINT "THE UNION HAS SURRENDERED"
|
||||
1500 PRINT
|
||||
1510 PRINT "YOU HAVE WON" W; "BATTLES AND LOST" L; "BATTLES."
|
||||
1515 IF Y=5 THEN 1550
|
||||
1520 IF W<=L THEN 1550
|
||||
1530 PRINT "THE CONFIDERACY HAS WON THE WAR"
|
||||
1540 STOP
|
||||
1550 PRINT "THE UNION HAS WON THE WAR"
|
||||
1560 END
|
104
dec/MNPOLY.BAS
Normal file
104
dec/MNPOLY.BAS
Normal file
@ -0,0 +1,104 @@
|
||||
1 ! THE FOLLOWING PROGRAM IS DESIGNED TO BUILD THE DISK FILES
|
||||
2 ! NEEDED TO PLAY MONOPOLY. TWO FILES MUST BE BUILT, THE FIRST
|
||||
3 ! CONTAINING THE NAMES OF THE PROPERTY, THE SOLD AND UNSOLD
|
||||
4 ! FLAGS, THE PRICES OF THE PROPERTY, AND THEIR RENTS.
|
||||
5 ! THE SECOND FILE CONTAINS THE CHANCE AND THE COMMUNITY
|
||||
6 ! CHEST MESSAGES AND THE INSTRUCTION MESSAGES FOR THE
|
||||
7 ! PLAYERS. THE DATA FOR THESE FILES WILL BE READ FROM THE
|
||||
8 ! PROGRAM WHEN IT IS RUN. THESE FILES MUST BE BUILT BEFORE THE
|
||||
9 ! GAME CAN BE PLAYED
|
||||
20 OPEN "PRPRTY" AS FILE 1: DIM #1,G$(40%)=25,L%(40),P(40%),R(40%)
|
||||
30 OPEN "MESAJ" AS FILE 3: DIM #3,C$(10)=50%,Z$(10)=50%,M$(20)=50%
|
||||
40 FOR I=1 TO 40
|
||||
42 READ G$(I),L%(I),P(I),R(I)
|
||||
44 NEXT I
|
||||
50 FOR I=1 TO 20
|
||||
52 READ M$(I)
|
||||
54 NEXT I
|
||||
60 FOR I=1 TO 10
|
||||
62 READ C$(I)
|
||||
64 NEXT I
|
||||
70 FOR I=1 TO 10
|
||||
72 READ Z$(I)
|
||||
74 NEXT I
|
||||
100 DATA "MEDITERRANEAN AVENUE",0,60,2
|
||||
102 DATA "COMMUNITY CHEST",0,0,0
|
||||
104 DATA "BALTIC AVENUE",0,60,4
|
||||
106 DATA "INCOME TAX",0,0,0
|
||||
108 DATA "READING RAILROAD",0,200,25
|
||||
110 DATA "ORIENTAL AVENUE",0,100,6
|
||||
112 DATA "CHANCE ?",0,0,0
|
||||
114 DATA "VERMONT AVENUE",0,100,6
|
||||
116 DATA "CONNECTICUT AVENUE",0,120,8
|
||||
118 DATA "VISITING IN JAIL",0,0,0
|
||||
120 DATA "ST.CHARLES PLACE",0,140,10
|
||||
122 DATA "ELECTRIC COMPANY",0,150,35
|
||||
124 DATA "STATES AVENUE",0,140,10
|
||||
126 DATA "VIRGINIA AVENUE",0,160,12
|
||||
128 DATA "PENNSYLVANIA RAILROAD"0,200,25
|
||||
130 DATA "ST.JAMES PLACE",0,180,14
|
||||
132 DATA "COMMUNITY CHEST",0,0,0
|
||||
134 DATA "TENNESSEE AVENUE",0,180,14
|
||||
136 DATA "NEW YORK AVENUE",0,200,16
|
||||
138 DATA "FREE PARKING",0,0,0
|
||||
140 DATA "KENTUCKY AVENUE",0,220,18
|
||||
142 DATA "CHANCE ?",0,0,0
|
||||
144 DATA "INDIANA AVENUE",0,220,18
|
||||
146 DATA "ILLINOIS AVENUE",0,240,20
|
||||
148 DATA "B.& O. RAILROAD",0,200,25
|
||||
150 DATA "ATLANTIC AVENUE",0,260,22
|
||||
152 DATA "VENTNOR AVENUE",0,260,22
|
||||
154 DATA "WATER WORKS",0,150,35
|
||||
156 DATA "MARVIN GARDENS",0,280,24
|
||||
158 DATA "GO TO JAIL",0,0,0
|
||||
160 DATA "PACIFIC AVENUE",0,300,26
|
||||
162 DATA "NORTH CAROLINA AVENUE",0,300,26
|
||||
164 DATA "COMMUNITY CHEST",0,0,0
|
||||
166 DATA "PENNSYLVANIA AVENUE",0,320,28
|
||||
168 DATA "SHORT LINE",0,200,25
|
||||
170 DATA "CHANCE ?",0,0,0
|
||||
172 DATA "PARK PLACE",0,350,35
|
||||
174 DATA "LUXURY TAX",0,0,0
|
||||
176 DATA "BOARDWALK",0,400,50
|
||||
178 DATA "GO",0,0,0
|
||||
200 DATA "*************THIS IS MATLIDA'S MONOPOLY FOR TWO*************"
|
||||
202 DATA "EACH PLAYER HAS $1500"
|
||||
204 DATA "WHEN YOU BUY HOUSES YOU HAVE TO PUT THE SAME"
|
||||
206 DATA "NUMBER ON EACH MEMBER OF A COLOR GROUP"
|
||||
208 DATA "WHEN YOU BUY HOUSES INPUT THE NUMBER YOU WANT PER LOT"
|
||||
210 DATA "TO ROLL DICE TYPE ROLL"
|
||||
212 DATA "IT IS FOR SALE FOR ONLY"
|
||||
214 DATA "IF YOU WISH TO BUY IT TYPE BUY"
|
||||
216 DATA "YOU ROLLED DOUBLES**ROLL AGAIN"
|
||||
218 DATA "YOU ROLLED 3 SETS OF DOUBLES**GO TO JAIL"
|
||||
220 DATA "IF YOU WANT TO QUIT TYPE QUIT"
|
||||
222 DATA "YOU ALREADY OWN THIS PIECE OF PROPERTY"
|
||||
224 DATA "IF THERE IS ANY PROPERTY YOU WISH TO SELL AND"
|
||||
226 DATA "YOUR OPPONENT WANTS TO BUY TYPE SELL"
|
||||
228 DATA "IF YOU NEED A LIST OF PROPERTY TYPE LIST"
|
||||
230 DATA "YOU CAN'T SELL THIS**YOU DON'T OWN IT"
|
||||
232 DATA "WHAT PROPERTY DO YOU WANT TO SELL"
|
||||
234 DATA "IF THERE IS ANY MORE PROPERTY YOU WISH TO SELL TYPE YES"
|
||||
236 DATA "IF YOU WANT TO IMPROVE YOUR PROPERTY TYPE HOUSE"
|
||||
238 DATA "YOU DON'T HAVE ENOUGH MONEY FOR THAT MANY HOUSES"
|
||||
250 DATA "PAY POOR TAX OF $15"
|
||||
252 DATA "ADVANCE TOKEN TO ILLINOIS AVENUE"
|
||||
254 DATA "GO BACK THREE SPACES"
|
||||
256 DATA "ADVANCE TO GO"
|
||||
258 DATA "BANK PAYS YOU DIVIDEND OF $50"
|
||||
260 DATA "TAKE A RIDE ON THE READING"
|
||||
262 DATA "GO TO JAIL"
|
||||
264 DATA "BUILDING AND LOAN MATURES**COLLECT $150"
|
||||
266 DATA "ADVANCE TO BOARDWALK"
|
||||
268 DATA "ADVANCE TO ST.CHARLES PLACE"
|
||||
280 DATA "XMAS FUND MATURES**COLLECT $100"
|
||||
282 DATA "LIFE INSURANCE MATURES**COLLECT $100"
|
||||
284 DATA "INCOME TAX REFUND**COLLECT $20"
|
||||
286 DATA "DOCTOR'S FEE**PAY $50"
|
||||
288 DATA "YOU INHERIT $100"
|
||||
290 DATA "ADVANCE TO GO"
|
||||
292 DATA "PAY HOSPITAL $100"
|
||||
294 DATA "GO TO JAIL"
|
||||
296 DATA "PAY SCHOOL TAX OF $50"
|
||||
298 DATA "BANK ERROR IN YOUR FAVOR**COLLECT $200"
|
||||
300 CLOSE 1,3: END
|
240
port/CIVILW.BAS
Normal file
240
port/CIVILW.BAS
Normal file
@ -0,0 +1,240 @@
|
||||
1 LET L=0\LET W=0\LET R1=0\LET P1=0
|
||||
2 LET Q1=0\LET M3=0\LET M4=0
|
||||
3 LET P2=0\LET T1=0\LET T2=0
|
||||
4 RANDOMIZE
|
||||
5 REMARKABLE PROGRAM BY L. CRAM , L. GOODIE , AND D. HIBBARD
|
||||
6 PRINT "DO YOU WANT DESCRIPTIONS (0=YES, 1=NO)";
|
||||
7 INPUT Z
|
||||
9 FOR U=1 TO 6
|
||||
10 PRINT
|
||||
11 NEXT U
|
||||
13 IF Z=1 THEN 100
|
||||
15 PRINT "THIS IS A CIVIL WAR SIMULATION."
|
||||
20 PRINT "TO PLAY, TYPE A RESPONSE WHEN THE COMPUTER ASKS."
|
||||
30 PRINT "REMEMBER THAT ALL FACTORS ARE INTERRELATED AND THAT YOUR"
|
||||
35 PRINT "RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE"
|
||||
40 PRINT "BASED ON THE ACTUAL OCCURENCE. MOST BATTLES TEND TO RESULT"
|
||||
45 PRINT "AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!"
|
||||
50 PRINT
|
||||
51 PRINT "THE OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS POSSIBLE"
|
||||
52 PRINT
|
||||
55 PRINT "YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:"
|
||||
60 PRINT " (1) ARTILLERY ATTACK"
|
||||
65 PRINT " (2) FORTIFICATION AGAINST FRONTAL ATTACK"
|
||||
70 PRINT " (3) FORTIFICATION AGAINST FLANKING MANEUVERS"
|
||||
75 PRINT " (4) FALLING BACK"
|
||||
80 PRINT "YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:"
|
||||
85 PRINT " (1) ARTILLERY ATTACK"
|
||||
90 PRINT " (2) FRONTAL ATTACK"
|
||||
95 PRINT " (3) FLANKING MANEUVERS"
|
||||
96 PRINT " (4) ENCIRCLEMENT"
|
||||
97 PRINT "YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY."
|
||||
98 PRINT
|
||||
99 PRINT "YOU ARE THE CONFEDERACY. GOOD LUCK!"
|
||||
100 READ M1,M2,C1,C2,M,A,U
|
||||
101 LET I1=10+(L-W)*2
|
||||
102 LET I2=10+(W-L)*2
|
||||
103 LET D1=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+0.5)
|
||||
104 LET D2=100*INT(M2*(100-I2)/2000+0.5)
|
||||
105 LET F1=5*M1/6
|
||||
106 LET A1=Z
|
||||
107 FOR U=1 TO 4
|
||||
108 PRINT
|
||||
109 NEXT U
|
||||
110 PRINT "THIS IS THE BATTLE OF ";
|
||||
115 GOSUB 800
|
||||
120 PRINT " ","CONFEDERACY"," UNION"
|
||||
130 PRINT "MEN"," ";INT(M1*(1+(P1-T1)/(M3+1)))," ";
|
||||
131 PRINT INT(M2*(1+(P2-T2)/(M4+1)))
|
||||
140 PRINT "MONEY","$";D1,"$";D2
|
||||
150 PRINT "INFLATION"," ";I1+15;"%"," ";I2;"%"
|
||||
160 PRINT
|
||||
170 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR FOOD";
|
||||
180 INPUT F
|
||||
185 IF F<0 THEN 750
|
||||
190 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR SALARIES";
|
||||
200 INPUT S
|
||||
205 IF S<0 THEN 750
|
||||
210 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR AMMUNITION";
|
||||
220 INPUT B
|
||||
221 IF B<0 THEN 750
|
||||
222 PRINT
|
||||
224 IF F+S+B<=D1 THEN 230
|
||||
226 PRINT "THINK AGAIN! YOU HAVE ONLY $" D1
|
||||
228 GOTO 160
|
||||
230 LET O=((2*F^2+S^2)/F1^2+1)
|
||||
235 IF O<10 THEN 260
|
||||
240 PRINT "MORALE IS HIGH"
|
||||
250 GOTO 300
|
||||
260 IF O<5 THEN 290
|
||||
270 PRINT "MORALE IS FAIR"
|
||||
280 GOTO 300
|
||||
290 PRINT "MORALE IS POOR"
|
||||
300 IF M<>3 THEN 330
|
||||
310 PRINT "YOU ARE ON THE OFFENSIVE"
|
||||
320 GOTO 370
|
||||
330 IF M<>1 THEN 360
|
||||
340 PRINT "YOU ARE ON THE DEFENSIVE"
|
||||
350 GOTO 370
|
||||
360 PRINT "BOTH SIDES ARE ON THE OFFENSIVE"
|
||||
370 PRINT
|
||||
380 PRINT "YOUR STRATEGY";
|
||||
390 INPUT Y
|
||||
391 IF Y=5 THEN 1487
|
||||
392 IF ABS(Y-3)<3 THEN 395
|
||||
393 PRINT "YOU JERK! USE THE OTHER SET OF STRATEGIES!!"
|
||||
394 GOTO 370
|
||||
395 PRINT
|
||||
400 PRINT " ","CONFEDERACY","UNION"
|
||||
410 LET C5=(2*C1/5)*(1+1/(2*(ABS(INT(4*RND(1)+1)-Y)+1)))
|
||||
412 LET C5=INT(C5*(1+1/O)*(1.28+F1/(B+1))+0.5)
|
||||
414 IF C5+100/O<M1*(1+(P1-T1)/(M3+1)) THEN 424
|
||||
416 LET C5=INT(13*M1/20*(1+(P1-T1)/(M3+1)))
|
||||
418 LET E=7*C5/13
|
||||
420 LET U=1
|
||||
422 GOTO 426
|
||||
424 LET E=100/O
|
||||
426 PRINT "CASUALTIES",C5,INT(17*C2*C1/(C5*20)+0.5)
|
||||
430 PRINT "DESERTIONS",INT(E),INT(5*O)
|
||||
432 PRINT
|
||||
433 IF C5-C1>=0 THEN 439
|
||||
435 PRINT "YOUR CASUALTIES WERE"INT(100*(C1-C5)/C1+0.5);"% LESS THAN"
|
||||
437 GOTO 441
|
||||
439 PRINT "YOUR CASUALTIES WERE"INT(100*(C5-C1)/C1+0.5);"% MORE THAN"
|
||||
441 PRINT "THE ACTUAL CASUALITIES AT ";
|
||||
443 LET A1=1
|
||||
445 GO SUB800
|
||||
450 IF U=1 THEN 470
|
||||
460 IF C5+E<17*C2*C1/(C5*20)+5*O THEN 490
|
||||
470 PRINT "YOU LOSE ";
|
||||
471 LET L=L+1
|
||||
480 GOTO 555
|
||||
490 PRINT "YOU WIN ";
|
||||
491 LET W=W+1
|
||||
555 GOSUB 800
|
||||
556 IF W=8 THEN 1490
|
||||
580 LET T1=T1+C5+E
|
||||
590 LET T2=T2+17*C2*C1/(C5*20)+5*O
|
||||
600 LET P1=P1+C1
|
||||
610 LET P2=P2+C2
|
||||
620 LET Q1=Q1+(F+S+B)
|
||||
630 LET R1=R1+M1*(100-I1)/20
|
||||
635 LETM3=M3+M1
|
||||
637 LET M4=M4+M2
|
||||
650 IF A=14 THEN 1500
|
||||
660 GOTO 100
|
||||
670 DATA 18000,18500,1967,2708,1,1,0
|
||||
672 DATA 40000,44894,10699,13047,3,2,0
|
||||
674 DATA 95000,115000,20614,15849,3,3,0
|
||||
676 DATA 54000,63000,10000,14000,2,4,0
|
||||
678 DATA 40000,50000,10000,12000,3,5,0
|
||||
680 DATA 75000,120000,5377,12653,1,6,0
|
||||
682 DATA 38000,45000,11000,12000,1,7,0
|
||||
684 DATA 32000,90000,13000,17197,2,8,0
|
||||
686 DATA 50000,70000,12000,19000,1,9,0
|
||||
688 DATA 72500,85000,20000,23000,3,10,0
|
||||
690 DATA 66000,60000,18000,16000,2,11,0
|
||||
692 DATA 37000,60000,6700,5800,2,12,0
|
||||
694 DATA 62000,110000,17723,18000,2,13,0
|
||||
696 DATA 65000,100000,8500,3700,1,14,0
|
||||
750 PRINT "GO TO JAIL."
|
||||
752 PRINT "GO DIRECTLY TO JAIL."
|
||||
754 PRINT "DO NOT PASS GO."
|
||||
756 PRINT "DO NOT COLLECT $200"
|
||||
758 GOTO 107
|
||||
800 IF A<>1 THEN 850
|
||||
810 PRINT "BULL RUN"
|
||||
820 IF A1=1 THEN 1480
|
||||
830PRINT"JULY 21,1861 GEN. BEAUREGARD COMMANDING THE SOUTH MET THE"
|
||||
832PRINT"UNION FORCES WITH GEN MCDOWELL IN A PREMATURE BATTLE AT BULL"
|
||||
834PRINT"RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."
|
||||
840 GO TO 1480
|
||||
850 IF A<>2 THEN 900
|
||||
860 PRINT "SHILOH"
|
||||
870 IF A1=1 THEN 1480
|
||||
880PRINT"APRIL 6-7,1862 THE CONFEDERATE SURPRISE ATTACK AT SHILOH"
|
||||
882PRINT"FAILED DUE TO POOR ORGANIZATION."
|
||||
890 GO TO 1480
|
||||
900 IF A<>3 THEN 950
|
||||
910 PRINT "SEVEN DAYS"
|
||||
920 IF A1=1 THEN 1480
|
||||
930PRINT"JUNE 25-JULY 1,1862 GENERAL LEE (CSA) UPHELD THE OFFENSIVE"
|
||||
932PRINT"THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN AND THE UNION"
|
||||
934PRINT"FORCES AWAY FROM RICHMOND."
|
||||
940 GO TO 1480
|
||||
950 IF A<>4 THEN 1000
|
||||
960 PRINT "THE SECOND BULL RUN"
|
||||
970 IF A1=1 THEN 1480
|
||||
980PRINT"AUG 29-30,1862 THE COMBINED CONFEDERATE FORCES UNDER LEE AND"
|
||||
982PRINT"JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON."
|
||||
990 GO TO 1480
|
||||
1000 IF A<>5 THEN 1050
|
||||
1010 PRINT "ANTIETAM"
|
||||
1020 IF A1=1 THEN 1480
|
||||
1030PRINT"SEPT 17,1862 THE SOUTH FAILED TO INCORPORATE MARYLAND INTO"
|
||||
1032PRINT"THE CONFEDERACY."
|
||||
1040 GO TO 1480
|
||||
1050 IF A<>6 THEN 1100
|
||||
1060 PRINT "FREDERICKSBURG"
|
||||
1070 IF A1=1 THEN 1480
|
||||
1080PRINT"DEC 13,1862 THE CONFEDERACY UNDER LEE SUCESSFULLY REPULSED"
|
||||
1082PRINT"AN ATTACK BY THE UNION UNDER GEN. BURNSIDE."
|
||||
1090 GOTO 1480
|
||||
1100 IF A <>7 THEN 1150
|
||||
1110 PRINT "MURFREESBORO"
|
||||
1120 IF A1=1 THEN 1480
|
||||
1130PRINT"DEC 31,1862 THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE"
|
||||
1140 GOTO 1480
|
||||
1150 IF A<>8 THEN 1200
|
||||
1160 PRINT "CHANCELLORSVILLE"
|
||||
1170 IF A1=1 THEN 1480
|
||||
1180PRINT"MAY 1-6,1863 THE SOUTH HAD A COSTLY VICTORY AND LOST ONE"
|
||||
1182PRINT"OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON."
|
||||
1190 GOTO 1480
|
||||
1200 IF A<>9 THEN 1250
|
||||
1210 PRINT "VICKSBURG"
|
||||
1220 IF A1=1 THEN 1480
|
||||
1230PRINT"JULY 4,1863 VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH"
|
||||
1232PRINT"BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."
|
||||
1240 GOTO 1480
|
||||
1250 IF A<>10 THEN 1300
|
||||
1260 PRINT "GETTYSBURG"
|
||||
1270 IF A1=1 THEN 1480
|
||||
1280PRINT"JUNE 30,1863 A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG"
|
||||
1282PRINT"COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."
|
||||
1290 GOTO 1480
|
||||
1300 IF A<>11 THEN 1350
|
||||
1310 PRINT "CHICKAMAUGA"
|
||||
1320 IF A1=1 THEN 1480
|
||||
1330PRINT"NOV 25,1863 AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'"
|
||||
1332PRINT"ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."
|
||||
1340 GOTO 1480
|
||||
1350 IF A<>12 THEN 1400
|
||||
1360 PRINT "CHATTANOOGA"
|
||||
1370 IF A1=1 THEN 1480
|
||||
1380PRINT"SEPT 15,1863 CONFUSION IN A FOREST NEAR CHICKAMAUGA LED"
|
||||
1382PRINT"TO A COSTLY SOUTHERN VICTORY."
|
||||
1390 GOTO 1480
|
||||
1400 IF A<>13 THEN 1450
|
||||
1410 PRINT "SPOTSYLVANIA"
|
||||
1420 IF A1=1 THEN 1480
|
||||
1430PRINT"MAY 5,1864 GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO FAIL"
|
||||
1432PRINT"HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."
|
||||
1440 GOTO 1480
|
||||
1450 PRINT "ATLANTA"
|
||||
1460 IF A1=1 THEN 1480
|
||||
1470PRINT"AUGUST, 1864 SHERMAN AND THREE VETERAN ARMIES CONVERGED ON"
|
||||
1472PRINT"ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."
|
||||
1480 PRINT
|
||||
1485 RETURN
|
||||
1487 PRINT "THE CONFEDERACY HAS SURRENDERED"
|
||||
1488 GOTO 1500
|
||||
1490 PRINT "THE UNION HAS SURRENDERED"
|
||||
1500 PRINT
|
||||
1510 PRINT "YOU HAVE WON" W; "BATTLES AND LOST" L; "BATTLES."
|
||||
1515 IF Y=5 THEN 1550
|
||||
1520 IF W<=L THEN 1550
|
||||
1530 PRINT "THE CONFIDERACY HAS WON THE WAR"
|
||||
1540 STOP
|
||||
1550 PRINT "THE UNION HAS WON THE WAR"
|
||||
1560 END
|
Loading…
Reference in New Issue
Block a user