perm filename WAR.BAS[NET,GUE] blob sn#003927 filedate 1972-11-03 generic text, type T, neo UTF8
00001 L=0
00002 W=0
00003 R1=0
00004 P1=0
00005 Q1=0
00006 M3=0
00007 M4=0
00008 P2=0
00009 T1=0
00010 T2=0
00041 PRINT "DO YOU WANT DESCRIPTIONS (0=YES, 1=NO)";
00051 INPUT Z
00061 FOR U=1 TO 6
00071 PRINT 
00081 NEXT U
00091 IF Z=1 THEN 321
00101 PRINT "THIS IS A CIVIL WAR SIMULATION."
00181 PRINT
00191 PRINT "DEFENSIVE STRATAGIES:"
00201 PRINT "    (1) ARTILLERY ATTACK"
00211 PRINT "    (2) FORTIFICATION AGAINST FRONTAL ATTACK"
00221 PRINT "    (3) FORTIFICATION AGAINST FLANKING MANUEVERS"
00231 PRINT "    (4) FALLING BACK"
00241 PRINT "OFFENSIVE STRATAGIES:"
00251 PRINT "    (1) ARTILLERY ATTACK"
00261 PRINT "    (2) FRONTAL ATTACK"
00271 PRINT "    (3) FLANKING MANUEVERS"
00281 PRINT "    (4) ENCIRCLEMENT"
00291 PRINT "YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATAGY"
00301 PRINT 
00311 PRINT "YOU ARE THE CONFEDERACY    GOOD LUCK!"
00321 READ M1,M2,C1,C2,M,A,U
00331 LET I1=10+(L-W)*2
00341 LET I2= 10+(W-L)*2
00351 LET D1=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+0.5)
00361 LET D2= 100*INT(M2*(100-I2)/2000+0.5)
00371 LET F1=5*M1/6
00381 LET A1=Z
00391 FOR U=1 TO 4
00401 PRINT 
00411 NEXT U
00421 PRINT "THIS IS THE BATTLE OF";
00431 GOSUB 1431
00441 PRINT " ","CONFEDERACY","  UNION"
00451 PRINT "MEN"," ";INT(M1*(1+(P1-T1)/(M3+1)))," ";
00461 PRINT INT(M2*(1+(P2-T2)/(M4+1)))
00471 PRINT "MONEY","$";D1,"$";D2
00481 PRINT "INFLATION"," ";I1+15;"%"," ";I2;"%"
00491 PRINT 
00501 PRINT "MONEY FOR FOOD";
00511 INPUT F
00521 IF F<0 THEN 1381
00531 PRINT "MONEY FOR SALARIES";
00541 INPUT S
00551 IF S<0 THEN 1381
00561 PRINT "MONEY FOR AMMUNITION";
00571 INPUT B
00581 IF B<0 THEN 1381
00591 PRINT 
00601 IF F+S+B<=D1 THEN 631
00611 PRINT "THINK AGAIN  YOU ONLY HAVE $" D1
00621 GO TO 491
00631 LET O=((2*F**2+S**2)/F1**2+1)
00641 IF O<10 THEN 671
00651 PRINT "MORAL IS HIGH"
00661 GO TO 711
00671 IF O<5 THEN 701
00681 PRINT "MORALE IS FAIR"
00691 GO TO 711
00701 PRINT "MORALE IS POOR"
00711 IF M<>3 THEN 741
00721 PRINT "YOU ARE ON THE OFFENSIVE"
00731 GO TO 781
00741 IF M<>1 THEN 771
00751 PRINT "YOU ARE ON THE DEFENSIVE"
00761 GO TO 781
00771 PRINT "BOTH SIDES ARE ON THE OFFENSIVE"
00781 PRINT 
00791 PRINT "YOUR STRATEGY";
00801 INPUT Y
00811 IF Y=5 THEN 2281
00821 IF ABS(Y-3)<3 THEN 851
00831 PRINT "PLEASE USE THE OTHER SET OF STRATGIES"
00841 GO TO 781
00851 PRINT
00861 PRINT " ","CONFEDERACY","UNION"
00871 LET C5=(2*C1/5)*(1+1/(2*(ABS(INT(4*RND(1)+1)-Y)+1)))
00881 LET C5= INT(C5*(1+1/O)*(1.28+F1/(B+1))+0.5)
00891 IF C5+100/O<M1*(1+(P1-T1)/(M3+1)) THEN 941
00901 LET C5=INT(13*M1/20*(1+(P1-T1)/(M3+1)))
00911 LET E=7*C5/13
00921 LET U=1
00931 GO TO 951
00941 LET E=100/O
00951 PRINT "CASUALTIES",C5,INT(17*C2*C1/(C5*20)+0.5)
00961 PRINT "DESERTIONS",INT(E),INT(5*O)
00971 PRINT 
00981 IF C5-C1>=0 THEN 1011
00991 PRINT "YOUR CASUALTIES WERE "INT(100*(C1-C5)/C1+0.5);"% LESS THAN "
01001 GO TO 1021
01011 PRINT "YOUR CASUALTIES WERE"INT(100*(C5-C1)/C1+0.5);"% MORE THAN"
01021 PRINT "THE ACTUAL CASUALTIES AT ";
01031 LET A1=1
01041 GOSUB 1431
01051 IF U=1 THEN 1071
01061 IF C5+E<17*C2*C1/(C5*20)+5*O THEN 1101
01071 PRINT "YOU LOSE";
01081 LET L=L+1
01091 GOTO 1121
01101 PRINT "YOU WIN";
01111 LET W=W+1
01121 GOSUB 1431
01131 IF W=8 THEN 2301
01141 LET T1=T1+C5+E
01151 LET T2=T2+17*C1/(C5*20)+5*O
01161 LET P1=P1+C1
01171 LET P2=P2+C2
01181 LET Q1=Q1+(F+S+B)
01191 LET R1=R1+M1*(100-I1)/20
01201 LET M3=M3+M1
01211 LET M4=M4+M2
01221 IF A=14 THEN 2311
01231 GO TO 321
01241 DATA 18000,18500,1967,2708,1,1,0
01251 DATA 40000,4484,10699,13047,3,2,0
01381 PRINT "ERROR"
01421 GO TO 391
01431 IF A<>1 THEN 1501
01441 PRINT "BULL RUN"
01451 IF A1=1 THEN 2261
01461 PRINT "JULY 21,1861"
01491 GO TO 2261
01501 IF A<>2 THEN 1561
01511 PRINT "SHILO"
01521 IF A1=1 THEN 2261
01531 PRINT " APRIL 6-7,1862"
01551 GO TO 2261
01561 PRINT
02261 PRINT 
02271 RETURN
02281 PRINT "CONFEDERACY HAS SURRENDERED"
02291 GO TO 2311
02301 PRINT "UNION SURRENDERS"
02311 PRINT
02321 PRINT "YOU HAVE WON"W;"AND LOST"L
02331 IF Y=5 THEN 2371
02341 IF W<=L THEN 2371
02351 PRINT "CONFEDERACY HAS WON"
02361 STOP
02371 PRINT "THE UNION HAS WON"
02381 END