diff --git a/dec/CHECKR.BAS b/dec/CHECKR.BAS new file mode 100644 index 0000000..b4d12cc --- /dev/null +++ b/dec/CHECKR.BAS @@ -0,0 +1,192 @@ +100 PRINT" THIS PROGRAM WILL PLAY CHECKERS. THE COMPUTER IS X," +200 PRINT"AND YOU ARE O. THE COMPUTER WILL GO FIRST,-NOTE: SQUARES" +300 PRINT"ARE IN THE FORM-(X,Y) AND SQ. 1,1 IS THE BOTTOM LEFT!" +400 PRINT"DO NOT ATTEMPT A DOUBLE JUMP OR YOUR PIECE MIGHT JUST " +500 PRINT"DISAPPEAR(SAME FOR A TRIPLE!)" +600 PRINT" WAIT FOR THE COMP. TO MOVE!!!!!" +700 LET G=-1 +800 DIM R(50) +900 LET L=-1 +1000 DIM S(10,10) +1100 DATA 1,0,1,0,0,0,-1,0,0,1,0,0,0,-1,0,-1,15 +1200 FOR X=1TO8 +1300 FOR Y=1TO8 +1400 READ J +1500 IF J=15 THEN 1800 +1600 LET S(X,Y)=J +1700 GOTO 2000 +1800 RESTORE +1900 READ S(X,Y) +2000 NEXT Y +2100 NEXT X +2200 REM +2300LETL=-1*L +2400 FOR X=1TO8 +2500 FOR Y=1TO8 +2600 IF S(X,Y)=0 THEN 3500 +2700 IF G>0 THEN 3000 +2800 IF S(X,Y)>0 THEN 3500 +2900 GOTO 3100 +3000 IF S(X,Y)<0 THEN 3500 +3100 IF ABS(S(X,Y))<>1 THEN 3300 +3200 GOSUB 4300 +3300 IF ABS(S(X,Y))<>2 THEN 3500 +3400 GOSUB 6500 +3500IFX<>8 THEN 3800 +3600IFL=1 THEN 3800 +3700RETURN +3800NEXT Y +3900NEXT X +4000PRINT +4100GOSUB11400 +4200 GOTO 2300 +4300 FOR A=-1TO1 STEP 2 +4400 LET U=X+A +4500 LET V=Y+G +4600 IF U<1 THEN 6300 +4700 IF U>8 THEN 6300 +4800 IF V<1 THEN 6300 +4900 IF V>8 THEN 6300 +5000 IF S(U,V)<>0 THEN 5300 +5100 GOSUB 9100 +5200 GOTO 6300 +5300 IF S(U,V)=G THEN 6300 +5400 IF S(U,V)=2*G THEN 6300 +5500 LET U=U+A +5600 LET V=V+G +5700 IF U<1 THEN 6300 +5800 IF U>8 THEN 6300 +5900 IF V<1 THEN 6300 +6000 IF V>8 THEN 6300 +6100 IF S(U,V)<>0 THEN 6300 +6200 GOSUB 9100 +6300 NEXT A +6400 RETURN +6500 REM KING MOVES +6600 FOR A=-1TO1 STEP 2 +6700 FOR B=-1TO1 STEP 2 +6800 LET U=X+A +6900 LET V=Y+B +7000 IF U<1 THEN 8700 +7100 IF U>8 THEN 8700 +7200 IF V<1 THEN 8700 +7300 IF V>8 THEN8700 +7400 IF S(U,V)<>0 THEN 7700 +7500 GOSUB 9100 +7600 GOTO 8700 +7700 IF S(U,V)=G THEN 8700 +7800 IF S(U,V)=2*G THEN 8700 +7900 LET U=U+A +8000 LET V=V+B +8100 IF U<1 THEN 8700 +8200 IF U>8 THEN 8700 +8300 IF V<1 THEN 8700 +8400 IF V>8 THEN 8700 +8500 IF S(U,V)<>0 THEN 8700 +8600 GOSUB 9100 +8700 NEXT B +8800 NEXT A +8900 RETURN +9000 GOTO 14200 +9100 REM +9200 LET P=P+1 +9300 IF P=K THEN 12300 +9400IF V<>(4.5+(3.5*G)) THEN 9600 +9500 LET Q=Q+2 +9600 IF X<>(4.5-(3.5*G)) THEN 9800 +9700LET Q=Q-2 +9800 REM +9900 IF U<>1 THEN 10100 +10000 LET Q=Q+1 +10100 IF U<>8 THEN 10300 +10200 LET Q=Q+1 +10300 FOR C=-1TO1 STEP 2 +10400 IF S(U+C,V+G)<1 THEN 10800 +10500 LET Q=Q-1 +10600 IF S(U-C,V-G)<>0 THEN 10800 +10700 LET Q=Q-1 +10800 REM THIS WAS THE EVALUATION SECTION +10900 REM +11000 NEXT C +11100 LET R(P)=Q +11200 LETQ=0 +11300 RETURN +11400 IF P=0 THEN 18800 +11500 FOR J=10TO-10 STEP -1 +11600 FOR F=1TOP +11700 IF R(F)=J THEN 12000 +11800 NEXT F +11900 NEXTJ +12000 LET K=F+P +12100 GOSUB 2300 +12200 RETURN +12300 PRINT" I MOVE FROM ("X;Y") TO ("U;V")" +12400 LET F=0 +12500 LET P=0 +12600 LET K=0 +12700 IF V<>(4.5+(3.5*G)) THEN 13000 +12800 LET S(U,V)=2*G +12900 GOTO 13100 +13000 LET S(U,V)=S(X,Y) +13100 LET S(X,Y)=0 +13200 IF ABS(X-U)<>2 THEN 13400 +13300 LET S((X+U)/2,(Y+V)/2)=0 +13400 PRINT"BOARD"; +13500 INPUT D$ +13600 IF D$<>"YES" THEN13900 +13700 GOSUB 14100 +13800 RETURN +13900 GOSUB 15800 +14000 RETURN +14100 PRINT +14200 FOR Y=8TO1 STEP -1 +14300 FOR X=1TO8 +14400 LET I=2*X +14500 IF S(X,Y)<>0 THEN 14700 +14600 PRINT TAB(I)"."; +14700 IF S(X,Y)<>1 THEN 14900 +14800 PRINT TAB(I)"O"; +14900 IF S(X,Y)<>-1 THEN 15100 +15000 PRINT TAB(I)"X"; +15100 IF S(X,Y)<>-2 THEN 15300 +15200 PRINT TAB(I)"X";TAB(I)"*"; +15300 IF S(X,Y)<>2 THEN 15500 +15400 PRINT TAB(I)"O";TAB(I)"*"; +15500 NEXT X +15600 PRINT +15700 NEXT Y +15800 PRINT +15900 PRINT"FROM"; +16000 INPUT E,H +16100 LET X=E +16200 LET Y=H +16300 IF S(X,Y)<>0 THEN 16700 +16400 PRINT "THERE IS NO ONE OCCUPING THAT SPACE" +16500 PRINT +16600 GOTO 15900 +16700 PRINT"TO"; +16800 INPUT A,B +16900 LET X=A +17000 LET Y=B +17100 IF S(X,Y)=0 THEN 17500 +17200 PRINT"THAT SPACE IS ALREADY OCCUPIED" +17300 PRINT +17400 GOTO 16700 +17500 LET S(A$B)=S(E,H) +17600 LET S(A,B)=S(E,H) +17700 LET S(E,H)=0 +17800 LET T=(4.5-(3.5*G)) +17900 IF ABS(E-A)<>2 THEN 18100 +18000 LET S((E+A)/2,(H+B)/2)=0 +18100 IF B<>T THEN 18300 +18200 LET S(A,B)=-2*G +18300 FOR X=8TO8 +18400 FOR Y=8TO8 +18500 RETURN +18600 NEXT Y +18700 NEXT X +18800 PRINT" VERY GOOD, YOU WIN!" +18900 PRINT +19000 PRINT +19100 PRINT" -CHUCK OUT" +19200 END diff --git a/dec/CHEMST.BAS b/dec/CHEMST.BAS new file mode 100644 index 0000000..eb1de89 --- /dev/null +++ b/dec/CHEMST.BAS @@ -0,0 +1,25 @@ +10 PRINT "THE FICTITIOUS CHEMICAL KRYPTOCYANIC ACID CAN ONLY BE" +20 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACIE." +30 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE" +40 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST" +50 PRINT "DECIDE HOW MUCH WATER TO ADD FOR DILUTION. IF YOU MISS" +60 PRINT "YOU FACE THE CONSEQUENCES." +100 LET A=INT(RND(1)*50) +110 LET W=7*A/3 +120 PRINT A"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER"; +130 INPUT R +140 LET D=ABS(W-R) +150 IF D>W/20 THEN 200 +160 PRINT "GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!" +170 PRINT +180 GO TO 100 +200 PRINT "SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB" +210 PRINT "OF QUIVERING PROTOPLASM!" +220 LET T=T+1 +230 IF T=9 THEN 260 +240 PRINT "HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE." +245 PRINT +250 GO TO 100 +260 PRINT "YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR" +270 PRINT "YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY." +280 END diff --git a/port/CHECKR.BAS b/port/CHECKR.BAS new file mode 100644 index 0000000..dff1533 --- /dev/null +++ b/port/CHECKR.BAS @@ -0,0 +1,192 @@ + 10 PRINT" THIS PROGRAM WILL PLAY CHECKERS. THE COMPUTER IS X," + 20 PRINT"AND YOU ARE O. THE COMPUTER WILL GO FIRST,-NOTE: SQUARES" + 30 PRINT"ARE IN THE FORM-(X,Y) AND SQ. 1,1 IS THE BOTTOM LEFT!" + 40 PRINT"DO NOT ATTEMPT A DOUBLE JUMP OR YOUR PIECE MIGHT JUST " + 50 PRINT"DISAPPEAR(SAME FOR A TRIPLE!)" + 60 PRINT" WAIT FOR THE COMP. TO MOVE!!!!!" + 70 LET G=-1 + 80 DIM R(50) + 90 LET L=-1 + 100 DIM S(10,10) + 110 DATA 1,0,1,0,0,0,-1,0,0,1,0,0,0,-1,0,-1,15 + 120 FOR X=1TO8 + 130 FOR Y=1TO8 + 140 READ J + 150 IF J=15 THEN 180 + 160 LET S(X,Y)=J + 170 GOTO 200 + 180 RESTORE + 190 READ S(X,Y) + 200 NEXT Y + 210 NEXT X + 220 REM + 230LETL=-1*L + 240 FOR X=1TO8 + 250 FOR Y=1TO8 + 260 IF S(X,Y)=0 THEN 350 + 270 IF G>0 THEN 300 + 280 IF S(X,Y)>0 THEN 350 + 290 GOTO 310 + 300 IF S(X,Y)<0 THEN 350 + 310 IF ABS(S(X,Y))<>1 THEN 330 + 320 GOSUB 430 + 330 IF ABS(S(X,Y))<>2 THEN 350 + 340 GOSUB 650 + 350IFX<>8 THEN 380 + 360IFL=1 THEN 380 + 370RETURN + 380NEXT Y + 390NEXT X + 400PRINT + 410GOSUB1140 + 420 GOTO 230 + 430 FOR A=-1TO1 STEP 2 + 440 LET U=X+A + 450 LET V=Y+G + 460 IF U<1 THEN 630 + 470 IF U>8 THEN 630 + 480 IF V<1 THEN 630 + 490 IF V>8 THEN 630 + 500 IF S(U,V)<>0 THEN 530 + 510 GOSUB 910 + 520 GOTO 630 + 530 IF S(U,V)=G THEN 630 + 540 IF S(U,V)=2*G THEN 630 + 550 LET U=U+A + 560 LET V=V+G + 570 IF U<1 THEN 630 + 580 IF U>8 THEN 630 + 590 IF V<1 THEN 630 + 600 IF V>8 THEN 630 + 610 IF S(U,V)<>0 THEN 630 + 620 GOSUB 910 + 630 NEXT A + 640 RETURN + 650 REM KING MOVES + 660 FOR A=-1TO1 STEP 2 + 670 FOR B=-1TO1 STEP 2 + 680 LET U=X+A + 690 LET V=Y+B + 700 IF U<1 THEN 870 + 710 IF U>8 THEN 870 + 720 IF V<1 THEN 870 + 730 IF V>8 THEN870 + 740 IF S(U,V)<>0 THEN 770 + 750 GOSUB 910 + 760 GOTO 870 + 770 IF S(U,V)=G THEN 870 + 780 IF S(U,V)=2*G THEN 870 + 790 LET U=U+A + 800 LET V=V+B + 810 IF U<1 THEN 870 + 820 IF U>8 THEN 870 + 830 IF V<1 THEN 870 + 840 IF V>8 THEN 870 + 850 IF S(U,V)<>0 THEN 870 + 860 GOSUB 910 + 870 NEXT B + 880 NEXT A + 890 RETURN + 900 GOTO 1420 + 910 REM + 920 LET P=P+1 + 930 IF P=K THEN 1230 + 940IF V<>(4.5+(3.5*G)) THEN 960 + 950 LET Q=Q+2 + 960 IF X<>(4.5-(3.5*G)) THEN 980 + 970LET Q=Q-2 + 980 REM + 990 IF U<>1 THEN 1010 +1000 LET Q=Q+1 +1010 IF U<>8 THEN 1030 +1020 LET Q=Q+1 +1030 FOR C=-1TO1 STEP 2 +1040 IF S(U+C,V+G)<1 THEN 1080 +1050 LET Q=Q-1 +1060 IF S(U-C,V-G)<>0 THEN 1080 +1070 LET Q=Q-1 +1080 REM THIS WAS THE EVALUATION SECTION +1090 REM +1100 NEXT C +1110 LET R(P)=Q +1120 LETQ=0 +1130 RETURN +1140 IF P=0 THEN 1880 +1150 FOR J=10TO-10 STEP -1 +1160 FOR F=1TOP +1170 IF R(F)=J THEN 1200 +1180 NEXT F +1190 NEXT J +1200 LET K=F+P +1210 GOSUB 230 +1220 RETURN +1230 PRINT" I MOVE FROM ("X;Y") TO ("U;V")" +1240 LET F=0 +1250 LET P=0 +1260 LET K=0 +1270 IF V<>(4.5+(3.5*G)) THEN 1300 +1280 LET S(U,V)=2*G +1290 GOTO 1310 +1300 LET S(U,V)=S(X,Y) +1310 LET S(X,Y)=0 +1320 IF ABS(X-U)<>2 THEN 1340 +1330 LET S((X+U)/2,(Y+V)/2)=0 +1340 PRINT"BOARD"; +1350 INPUT D$ +1360 IF D$<>"YES" THEN1390 +1370 GOSUB 1410 +1380 RETURN +1390 GOSUB 1580 +1400 RETURN +1410 PRINT +1420 FOR Y=8TO1 STEP -1 +1430 FOR X=1TO8 +1440 LET I=2*X +1450 IF S(X,Y)<>0 THEN 1470 +1460 PRINT TAB(I)"."; +1470 IF S(X,Y)<>1 THEN 1490 +1480 PRINT TAB(I)"O"; +1490 IF S(X,Y)<>-1 THEN 1510 +1500 PRINT TAB(I)"X"; +1510 IF S(X,Y)<>-2 THEN 1530 +1520 PRINT TAB(I)"X*"; +1530 IF S(X,Y)<>2 THEN 1550 +1540 PRINT TAB(I)"O*"; +1550 NEXT X +1560 PRINT +1570 NEXT Y +1580 PRINT +1590 PRINT"FROM"; +1600 INPUT E,H +1610 LET X=E +1620 LET Y=H +1630 IF S(X,Y)<>0 THEN 1670 +1640 PRINT "THERE IS NO ONE OCCUPYING THAT SPACE" +1650 PRINT +1660 GOTO 1590 +1670 PRINT"TO"; +1680 INPUT A,B +1690 LET X=A +1700 LET Y=B +1710 IF S(X,Y)=0 THEN 1750 +1720 PRINT"THAT SPACE IS ALREADY OCCUPIED" +1730 PRINT +1740 GOTO 1670 +1750 ' LET S(A$B)=S(E,H) +1760 LET S(A,B)=S(E,H) +1770 LET S(E,H)=0 +1780 LET T=(4.5-(3.5*G)) +1790 IF ABS(E-A)<>2 THEN 1810 +1800 LET S((E+A)/2,(H+B)/2)=0 +1810 IF B<>T THEN 1830 +1820 LET S(A,B)=-2*G +1830 FOR X=8TO8 +1840 FOR Y=8TO8 +1850 RETURN +1860 NEXT Y +1870 NEXT X +1880 PRINT" VERY GOOD, YOU WIN!" +1890 PRINT +1900 PRINT +1910 PRINT" -CHUCK OUT" +1920 END diff --git a/port/CHEMST.BAS b/port/CHEMST.BAS new file mode 100644 index 0000000..b419be2 --- /dev/null +++ b/port/CHEMST.BAS @@ -0,0 +1,26 @@ + 10 PRINT "THE FICTITIOUS CHEMICAL KRYPTOCYANIC ACID CAN ONLY BE" + 20 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACID." + 30 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE" + 40 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST" + 50 PRINT "DECIDE HOW MUCH WATER TO ADD FOR DILUTION. IF YOU MISS" + 60 PRINT "YOU FACE THE CONSEQUENCES." + 90 RANDOMIZE + 100 LET A=INT(RND(1)*50)+1 + 110 LET W=7*A/3 + 120 PRINT A"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER"; + 130 INPUT R + 140 LET D=ABS(W-R) + 150 IF D>W/20 THEN 200 + 160 PRINT "GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!" + 170 PRINT + 180 GO TO 100 + 200 PRINT "SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB" + 210 PRINT "OF QUIVERING PROTOPLASM!" + 220 LET T=T+1 + 230 IF T=9 THEN 260 + 240 PRINT "HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE." + 245 PRINT + 250 GO TO 100 + 260 PRINT "YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR" + 270 PRINT "YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY." + 280 END