10 REM PRINT TAB(33);"WAR"
20 REM PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
30 PRINT: PRINT: PRINT
100 PRINT "THIS IS THE CARD GAME OF WAR.  EACH CARD IS GIVEN BY SUIT-#"
110 PRINT "AS S-7 FOR SPADE 7.  ";
120 INPUT "DO YOU WANT DIRECTIONS (1=yes, 0=no)? ";V
140 IF V=0 THEN GOTO 210
150 IF V=1 THEN GOTO 180
160 PRINT "YES OR NO, PLEASE."
170 GOTO 120
180 PRINT "THE COMPUTER GIVES YOU AND IT A 'CARD'.  THE HIGHER CARD"
190 PRINT "(NUMERICALLY) WINS.  THE GAME ENDS WHEN YOU CHOOSE NOT TO"
200 PRINT "CONTINUE OR WHEN YOU HAVE FINISHED THE PACK."
210 PRINT
220 PRINT
230 REM DIM A$(52),L(54)
240 LET P=0 : FOR Y = 0 TO 51
250 LET @(Y) = Y : NEXT y
260 LET Y = 52
270 LET Z = RND(52)
280 LET X=@(Y) : LET @(Y)= @(Z) : LET @(Z)= X
290 LET Y=Y-1 : IF Y THEN GOTO 270
300 M=@(P) : P=P+1
310 R=@(P) : P=P+1
400 PRINT
420 PRINT "YOU: "; : GOSUB 1000+(M*10) : PRINT " COMPUTER: "; : GOSUB 1000+(R*10) : PRINT
430 N=(M/4)
440 Q=(R/4)
450 IF (N>Q)+(N=Q) THEN GOTO 490
460 A=A+1
470 PRINT "THE COMPUTER WINS!!! YOU HAVE ";B;" AND THE COMPUTER HAS ";A
480 GOTO 540
490 IF N=Q THEN GOTO 530
500 B=B+1
510 PRINT "YOU WIN. YOU HAVE ";B;" AND THE COMPUTER HAS ";A
520 GOTO 540
530 PRINT "TIE.  NO SCORE CHANGE."
540 IF P=52 THEN GOTO 610
550 INPUT "DO YOU WANT TO CONTINUE (1=yes, 0=no)? ";V
570 IF V=1 THEN GOTO 300
580 IF V=0 THEN GOTO 650
590 PRINT "YES OR NO, PLEASE."
600 GOTO 550
610 PRINT
620 PRINT
630 PRINT "WE HAVE RUN OUT OF CARDS.  FINAL SCORE:  YOU: ";B;
640 PRINT ", THE COMPUTER: ";A : PRINT
650 PRINT "THANKS FOR PLAYING.  IT WAS FUN."
655 PRINT : END
1000 PRINT "S-2"; : RETURN
1010 PRINT "H-2"; : RETURN
1020 PRINT "C-2"; : RETURN
1030 PRINT "D-2"; : RETURN
1040 PRINT "S-3"; : RETURN
1050 PRINT "H-3"; : RETURN
1060 PRINT "C-3"; : RETURN
1070 PRINT "D-3"; : RETURN
1080 PRINT "S-4"; : RETURN
1090 PRINT "H-4"; : RETURN
1100 PRINT "C-4"; : RETURN
1110 PRINT "D-4"; : RETURN
1120 PRINT "S-5"; : RETURN
1130 PRINT "H-5"; : RETURN
1140 PRINT "C-5"; : RETURN
1150 PRINT "D-5"; : RETURN
1160 PRINT "S-6"; : RETURN
1170 PRINT "H-6"; : RETURN
1180 PRINT "C-6"; : RETURN
1190 PRINT "D-6"; : RETURN
1200 PRINT "S-7"; : RETURN
1210 PRINT "H-7"; : RETURN
1220 PRINT "C-7"; : RETURN
1230 PRINT "D-7"; : RETURN
1240 PRINT "S-8"; : RETURN
1250 PRINT "H-8"; : RETURN
1260 PRINT "C-8"; : RETURN
1270 PRINT "D-8"; : RETURN
1280 PRINT "S-9"; : RETURN
1290 PRINT "H-9"; : RETURN
1300 PRINT "C-9"; : RETURN
1310 PRINT "D-9"; : RETURN
1320 PRINT "S-10"; : RETURN
1330 PRINT "H-10"; : RETURN
1340 PRINT "C-10"; : RETURN
1350 PRINT "D-10"; : RETURN
1360 PRINT "S-J"; : RETURN
1370 PRINT "H-J"; : RETURN
1380 PRINT "C-J"; : RETURN
1390 PRINT "D-J"; : RETURN
1400 PRINT "S-Q"; : RETURN
1410 PRINT "H-Q"; : RETURN
1420 PRINT "C-Q"; : RETURN
1430 PRINT "D-Q"; : RETURN
1440 PRINT "S-K"; : RETURN
1450 PRINT "H-K"; : RETURN
1460 PRINT "C-K"; : RETURN
1470 PRINT "D-K"; : RETURN
1480 PRINT "S-A"; : RETURN
1490 PRINT "H-A"; : RETURN
1500 PRINT "C-A"; : RETURN
1510 PRINT "D-A"; : RETURN

