10 PRINT TAB(22);"JUMPING BALLS" 20 PRINT TAB(20);"CREATIVE COMPUTING" 30 PRINT TAB(18);"MORRISTOWN, NEW JERSEY" 40 PRINT:PRINT:PRINT 1040 DIM Q(9,1) 1050 PRINT "INSTRUCTIONS"; 1060 INPUT A\$ 1070 IF LEFT\$(A\$,1)="N" THEN 1150 1080 PRINT "IN THIS GAME YOU ARE GIVEN 8 BALLS ON A 9 HOLE" 1090 PRINT "BOARD. THE OBJECT IS TO REVERSE THE ORDER OF THE BALLS" 1100 PRINT "THE 'S' ARE SILVER BALLS AND THE 'G' ARE GOLD." 1110 PRINT "YOU MUST SET THE SILVER TO WHERE THE GOLD ARE AND" 1120 PRINT "THE GOLD TO WHERE THE SILVER ARE. THE SPACE IS" 1125 PRINT "A PERIOD ON THE BOARD." 1130 PRINT "GOOD LUCK!! HERE IS THE BOARD:" 1140 S=0 1150 FOR X=1 TO 4 1160 LET Q(X,1)=1 1170 NEXT X 1180 LET Q(5,1)=O 1190 FOR X=6 TO 9 1200 LET Q(X,1)=2 1210 NEXT X 1220 LET A\$=".SG" 1230 FOR X=1 TO 9 1240 PRINT MID\$(A\$,Q(X,1)+1,1); 1250 PRINT " "; 1260 NEXT X 1265 S=S+1 1270 PRINT "MOVE"; 1280 INPUT M,M1 1290 IF M<=9 AND M>=1 AND M1<=9 AND M1>=1 THEN 1320 1300 PRINT "ILLEGAL MOVE" 1310 GOTO 1270 1320 REM: CHECK FOR LEGAL MOVE 1330 IF M+1=M1 OR M-1=M1 THEN 1430 1340 REM: SUBROUTINE FOR CHECKING JUMPS 1350 IF M=9 THEN 1390 1360 IF M=1 THEN 1410 1370 IF Q(M+1,1)=0 OR Q(M-1,1)=0 THEN 1300 1380 GOTO 1420 1390 IF Q(M-1,1)=0 THEN 1300 1400 GOTO 1420 1410 IF Q(M+1,1)=0 THEN 1300 1420 IF M+2<>M1 AND M-2<>M1 THEN 1300 1430 IF Q(M,1)<>0 THEN 1460 1440 PRINT "NOTHING AT SPACE";M 1450 GOTO 1270 1460 IF Q(M1,1)=0 THEN 1490 1470 PRINT "SPACE";M1;"IS OCCUPIED" 1480 GOTO 1270 1490 LET Q(M1,1)=Q(M,1) 1500 LET Q(M,1)=0 1510 X9=Q(1,1)+Q(2,1)+Q(3,1)+Q(4,1) 1512 Y9=Q(6,1)+Q(7,1)+Q(8,1)+Q(9,1) 1514 IF X9=8 AND Y9=4 THEN 1530 1520 GOTO 1230 1530 PRINT "YOU WIN!!!" 1535 PRINT "YOU COMPLETED THE GAME IN ";S;" MOVES!!!!" 1540 PRINT "AGAIN"; 1550 INPUT A\$ 1560 IF LEFT\$(A\$,1)="Y" THEN 1130 1570 END