1 PRINT CHR$(26):WIDTH 80
2 PRINT TAB(26);"CIVIL WAR":PRINT
4 PRINT TAB(10);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
6 PRINT:PRINT:PRINT
10  REM FINAL CORRECTIONS OCT. 11,1971
20  REM RETYPED BY EDWARD GLAGOLA 3/73 RIVER DELL H.S.
30 REM
40 LET L=0: W=0: P1=0
50 LET R1=0: Q1=0
60 LET R1=0: T2=0: T1=0: P2=0
70 LET M1=0: M2=0: M3=0: M4=0
80  REM ARKABLE CORECTIONS BY DENNIS COLBURN (11/72)
90  REM ADE BY ED GLAGOLA(3/73)
100  PRINT "DO YOU WANT DESCRIPTIONS";
110  INPUT A$
115 PRINT
120  FOR U=1 TO 6
130  NEXT U
140 IF LEFT$(A$,1)="N" THEN 380
150  PRINT " THIS IS A CIVIL WAR SIMULATION."
160  PRINT " TO PLAY TYPE A RESPONSE WHEN THE COMPUTER ASKS."
170  PRINT " RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE"
180  PRINT " BASED ON THE ACTUAL OCCURANCE.  MOST BATTLES TEND TO RESULT"
190  PRINT " AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!"
200  PRINT 
210  PRINT " THE  OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS POSSIBLE"
220  PRINT 
230  PRINT " YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:"
240  PRINT TAB(8)"(1) ARTILLERY ATTACK"
250  PRINT TAB(8)"(2) FORTIFICATION AGAINST FRONTAL ATTACK"
260  PRINT TAB(8)"(3) FORTIFICATION AGAINST FLANKING MANUEVERS"
270  PRINT TAB(8)"(4) FALLING BACK"
280  PRINT " YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:"
290  PRINT TAB(8)"(1) ARTILLERY ATTACK"
300  PRINT TAB(8)"(2) FRONTAL ATTACK"
310  PRINT TAB(8)"(3) FLANKING MANUEVERS"
320  PRINT TAB(8)"(4) ENCIRCLEMENT"
330  PRINT " YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY."
340  PRINT 
350  PRINT " YOU ARE THE CONFEDERACY.     GOOD LUCK!"
355 PRINT:LINE INPUT "ENTER A RANDOM NUMBER TO START THE GAME: ";RR$:PRINT
356 RR=VAL(RR$):RR=RND(RR)
360  LET Z=0
370  GOTO 390
380  LET Z=1
390  READ M1,M2,C1,C2,M,A,U
400  LET I1=10+(L-W)*2
410  LET I2=10+(W-L)*2
420  LET D1=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+.5)
430  LET D2=100*INT(M2*(100-I2)/2000+.5)
440  LET F1=5*M1/6
450  LET A1=Z
460  FOR U=1 TO 4
470  PRINT 
480  NEXT U
490  PRINT "  THIS IS THE BATTLE OF ";
500  GOSUB 1480
510  PRINT " ","CONFEDERACY","  UNION"
515 PRINT " ","===========","========="
520  PRINT "MEN"," ";:PRINT USING "####,###";INT(M1*(1+(P1-T1)/(M3+1))),:

     PRINT "      ";
530  PRINT USING "###,###";INT(M2*(1+(P2-T2)/(M4+1)))
540 PRINT "MONEY",:PRINT USING " $$##,###     $$##,###";D1,D2
550  PRINT "INFLATION","     ";I1+15;CHR$(8);"%","     ";I2;CHR$(8);"%"
560  PRINT 
570  PRINT " HOW MUCH DO YOU WISH TO SPEND FOR FOOD";
580  INPUT F
590  IF F<0 THEN 1430
600  PRINT " HOW MUCH DO YOU WISH TO SPEND FOR SALARIES";
610  INPUT S
620  IF S<0 THEN 1430
630  PRINT " HOW MUCH DO YOU WISH TO SPEND FOR AMMUNITION";
640  INPUT B
650  IF B<0 THEN 1430
660  PRINT 
670  IF F+S+B <= D1 THEN 700
680  PRINT " THINK AGAIN!   YOU HAVE ONLY $";D1
690  GOTO 560
700  LET O=((2*F^2+S^2)/F1^2+1)
710  IF S<.15*D1 THEN 730
720  GOTO 740
730  O=4
740  IF O<10 THEN 770
750  PRINT " MORALE IS HIGH."
760  GOTO 810
770  IF O<5 THEN 800
780  PRINT " MORALE IS FAIR."
790  GOTO 810
800  PRINT " MORALE IS POOR."
810  IF M<>3 THEN 840
820  PRINT " YOU ARE ON THE OFFENSIVE."
830  GOTO 880
840  IF M<>1 THEN 870
850  PRINT " YOU ARE ON THE DEFENSIVE."
860  GOTO 880
870  PRINT " BOTH SIDES ARE ON THE OFFENSIVE."
880  PRINT 
890  PRINT " YOUR STRATEGY";
900  INPUT Y
910  IF Y=5 THEN 2330
920  PRINT 
930  PRINT " ","CONFEDERACY","    UNION"
935  PRINT " ","-----------","  ---------"
940  LET C5=(2*C1/5)*(1+1/(2*(ABS(INT(4*RND(1)+1)-Y)+1)))
950  LET C5=INT(C5*(1+1/O)*(1.28+F1/(B+1))+.5)
960  IF C5+100/O<M1*(1+(P1-T1)/(M3+1)) THEN 1010
970  LET C5=INT(13*M1/20*(1+(P1-T1)/(M3+1)))
980  LET E=7*C5/13
990  LET U=1
1000  GOTO 1020
1010  LET E=100/O
1020  PRINT "CASUALTIES",:PRINT USING "  ###,###       ###,###";

      C5,INT(17*C2*C1/(C5*20)+.5)
1030  PRINT 
1040  IF C5-C1 >= 0 THEN 1070
1050  PRINT " YOUR CASUALTIES WERE"INT(100*(C1-C5)/C1+.5);CHR$(8);"% LESS THAN"
1060  GOTO 1080
1070  PRINT" YOUR CASUALTIES WERE";INT(100*(C5-C1)/C1+.5);CHR$(8);"% MORE THAN"
1080  PRINT " THE ACTUAL CASUALTIES AT ";
1090  LET A1=1
1100  GOSUB 1480
1110  IF U=1 THEN 1130
1120  IF C5+E<17*C2*C1/(C5*20)+5*O THEN 1160
1130  PRINT "YOU LOSE ";
1140  LET L=L+1
1150  GOTO 1180
1160  PRINT " YOU WIN ";
1170  LET W=W+1
1180  GOSUB 1480
1190  LET T1=T1+C5+E
1200  LET T2=T2+17*C1*C2/(C5*20)+5*O
1210  LET P1=P1+C1
1220  LET P2=P2+C2
1230  LET Q1=Q1+(F+S+B)
1240  LET R1=R1+M1*(100-I1)/20
1250  LET M3=M3+M1
1260  LET M4=M4+M2
1270  IF A=14 THEN 2360
1280 LINE INPUT "ENTER 'RETURN' TO CONTINUE.";XX$:GOTO 390
1290  DATA 18000,18500,1967,2708,1,1,0
1300  DATA 40000.,44894.,10699,13047,3,2,0
1310  DATA 95000.,115000.,20614,15849,3,3,0
1320  DATA 54000.,63000.,10000,14000,2,4,0
1330  DATA 40000.,50000.,10000,12000,3,5,0
1340  DATA 75000.,120000.,5377,12653,3,6,0
1350  DATA 38000.,45000.,11000,12000,1,7,0
1360  DATA 32000,90000.,13000,17197,2,8,0
1370  DATA 50000.,70000.,12000,19000,1,9,0
1380  DATA 72500.,85000.,20000,23000,3,10,0
1390  DATA 66000.,60000.,18000,16000,2,11,0
1400  DATA 37000.,60000.,6700,5800,1,12,0
1410  DATA 62000.,110000.,17723,18000,2,13,0
1420  DATA 65000.,110000.,6700,6800,1,14,0
1430  PRINT "GO TO JAIL."
1440  PRINT " GO DIRECTLY TO JAIL."
1450  PRINT " DO NOT PASS GO."
1460  PRINT " DO NOT COLLECT $200."
1470  GOTO 460
1480  IF A<>1 THEN 1550
1490  PRINT "BULL RUN.":PRINT
1500  IF A1=1 THEN 2310
1510  PRINT " JULY 21,1861:  GEN. BEAUREGARD COMMANDING THE SOUTH MET THE "
1520  PRINT " UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT BULL"
1530  PRINT " RUN.  GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK."
1540  GOTO 2310
1550  IF A<>2 THEN 1610
1560  PRINT "SHILOH.":PRINT
1570  IF A1=1 THEN 2310
1580  PRINT " APRIL 6-7,1862:  THE CONFEDERATE SURPRISE ATTACK AT SHILOH "
1590  PRINT " FAILED DUE TO POOR ORGANIZATION."
1600  GOTO 2310
1610  IF A<>3 THEN 1680
1620  PRINT "SEVEN DAYS.":PRINT
1630  IF A1=1 THEN 2310
1640  PRINT " JUNE 25-JULY 1,1862:  GENERAL LEE (CSA) UPHELD THE OFFENSIVE"
1650  PRINT " THROUGHOUT THE BATTLE AND FORCED GEN. MCLELLAN AND THE UNION"
1660  PRINT " FORCES AWAY FROM RICHMOND."
1670  GOTO 2310
1680  IF A<>4 THEN 1740
1690  PRINT "THE SECOND BULL RUN.":PRINT
1700  IF A1=1 THEN 2310
1710  PRINT " AUG. 20-30,1862:   THE COMBINED CONFEDERATE FORCES UNDER LEE AND"
1720  PRINT " JACKSON DROVE THE UNION FORCES BACK INTO  WASHINGTON. "
1730  GOTO 2310
1740  IF A<>5 THEN 1800
1750  PRINT "ANTIETAM.":PRINT
1760  IF A1=1 THEN 2310
1770  PRINT " SEPT. 17,1862:   THE SOUTH FAILED TO INCORPORATE MARYLAND INTO"
1780  PRINT " THE CONFEDERACY."
1790  GOTO 2310
1800  IF A<>6 THEN 1860
1810  PRINT "FREDERICKSBURG.":PRINT
1820  IF A1=1 THEN 2310
1830  PRINT " DEC.13,1862:   THE CONFEDERACY UNDER LEE SUCCESSFULLY REPULSED"
1840  PRINT " AN ATTACK BY THE UNION UNDER GEN. BURNSIDE. "
1850  GOTO 2310
1860  IF A<>7 THEN 1910
1870  PRINT "MURFREESBORO.":PRINT
1880  IF A1=1 THEN 2310
1890  PRINT " DEC. 31,1862:  THE SOUTH UNDER GEN. BRAGG WON A CLOSE BATTLE. "
1900  GOTO 2310
1910  IF A<>8 THEN 1970
1920  PRINT "CHANCELLORSVILLE.":PRINT
1930  IF A1=1 THEN 2310
1940  PRINT " MAY 1-6,1863:   THE SOUTH HAD A COSTLY VICTORY AND LOST ONE"
1950  PRINT " OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON. "
1960  GOTO 2310
1970  IF A<>9 THEN 2030
1980  PRINT "VICKSBURG.":PRINT
1990  IF A1=1 THEN 2310
2000  PRINT " JULY 4,1863:  VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH "
2010  PRINT " BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI."
2020  GOTO 2310
2030  IF A<>10 THEN 2090
2040  PRINT "GETTYSBURG.":PRINT
2050  IF A1=1 THEN 2310
2060  PRINT " JUNE 30,1863:   A SOUTHERN MISTAKE BY GEN. LEE AT GETTYSBURG"
2070  PRINT " COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR."
2080  GOTO 2310
2090  IF A<>11 THEN 2150
2100  PRINT "CHICKAMAUGUA.":PRINT
2110  IF A1=1 THEN 2310
2120  PRINT " NOV. 25,1863:   AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'"
2130  PRINT " ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE."
2140  GOTO 2310
2150  IF A<>12 THEN 2210
2160  PRINT "CHATTANOOGA.":PRINT
2170  IF A1=1 THEN 2310
2180  PRINT " SEPT. 15,1863:   CONFUSION IN A FOREST NEAR CHICKAMAUGA LED"
2190  PRINT " LED TO A VERY BLOODY BATTLE. "
2200  GOTO 2310
2210  IF A<>13 THEN 2270
2220  PRINT "SPOTSYLVANIA.":PRINT 
2230  IF A1=1 THEN 2310
2240  PRINT " MAY 5,1864:   GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO FAIL"
2250  PRINT " HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG."
2260  GOTO 2310
2270  PRINT "ATLANTA.":PRINT
2280  IF A1=1 THEN 2310
2290  PRINT " AUGUST,1864:   SHERMAN AND THREE VETERAN ARMIES CONVERGED ON"
2300  PRINT " ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY."
2310  PRINT 
2320  RETURN 
2330 PRINT CHR$(22);"  THE CONFEDERACY HAS SURRENDERED.  ";CHR$(22)
2340  GOTO 2360
2350 PRINT CHR$(22);"  THE UNION HAS SURRENDERED.  ";CHR$(22)
2360  PRINT 
2370  PRINT "YOU HAVE WON "W;"BATTLES AND LOST"L;"BATTLES."
2380  IF Y=5 THEN 2420
2390  IF W <= L THEN 2420
2400 PRINT CHR$(22);"  THE CONFEDERACY HAS WON THE WAR.  ";CHR$(22)
2410  GOTO 2430
2420 PRINT CHR$(22);"  THE UNION HAS WON THE WAR.  ";CHR$(22)
2430 RUN "MENU"
