oddemann Posted January 18, 2022 Share Posted January 18, 2022 (edited) "Terrific GAMES for the Tl99/4A" (Book) by Hal Renko and Sam Edwards Most of the program codes can be found here... https://www.ti99iuc.it/web/index.php?pageid=database_cerca&archivioid=643 And here is the PDF! Terrific Games for the TI994A - 1983 - by HalRenko Sam Edwards.pdf Edited January 18, 2022 by oddemann Bugs even in the text :p 1 Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 (edited) "Here Lives/QUI VIVE" This is the first of some program code that is missing on the web page. Anyway, I looked at... "Here Lives/QUI VIVE" and I am stomped at 1700, I think most of the bugs are out. Anyone? looked at it so much that I am a little blind at the moment... Will try again later. But the 1700 bug got me confused. Now with last bug fix by @Lee Stewart But it still stops at 1700 (for me) Spoiler 10 REM TI EXTENDED-QUI VIVE 20 CALL CLEAR 30 RANDOMIZE 40 DIM SF(41,4),SO(41) 50 DIM D(107,1),DF(15,8) 60 DIM CC(4,1),B(24),C(24) 70 GOTO 1870 80 REM compute points of df********** 90 GV=0 :: P1=0 :: P2=0 :: C1=0 :: C2=0 100 D1=B(DF(NF,0)):: D2=B(DF(NF,1)) 110 IF D1=1 OR 02=1 THEN P1=1 120 IF D1=10 OR 02=10 THEN C1=10 130 D1=B(DF(NF,2)):: D2=B(DF(NF,3)) 140 IF D1=1 OR 02=1 THEN P2=1 150 IF D1=10 OR D2=10 THEN C2=10 160 GV=B(DF(NF,4))+B(DF(NF,5))+B(DF(NF,6)) 170 P=GV+P1+P2+C1+C2 180 IF GV=30 AND(C1=0 OR C2=0)THEN P=P-10 190 IF GV=3 AND(P1=0 OR P2=0)THEN P=P-1 200 RETURN 210 REM initialize single figu~es (sf) 220 FOR I=0 TO 41 :: READ X$ 230 FOR J=1 TO 5 240 SF(I,J-1)=ASC(SEG$(X$,J,1))-65 250 NEXT J :: NEXT I :: RETURN 260 REM wings(AV<>)***** 270 DATA UQMSV,PLHNT,KGCIO 280 DATA AGMIE,FLRNJ,KQWSO 290 DATA AGMQU,BHNRV,CIOSW 300 DATA EIHSV,DHLRX,CGKQW 310 REM times(X)***** 320 DATA ACGKM,BDHLN,CEIMO 330 DATA FLHPR,GIMQS,HJNRT 340 DATA KMQUW,LNRVX,MOSWY 350 REM plus(+)***** 360 DATA BFGHL,CGHIM,DHIJN 370 DATA GKLMQ,HLMNR,IMNOS 380 DATA LPQRV,MQRSW,NRSTX 390 REM diagonals(\/) 400 DATA AGHSY,EIMQU 410 REM columns(I)***** 420 DATA AFKPU,BGLQV,CHMRW 430 DATA DINSX,EJOTY 440 REM rows(-)***** 450 DATA ABCDE,FGHIJ,KLMNO 460 DATA PQRST,UVWXY 470 REM initialize double figures (df) 480 FOR I=0 TO 107 STEP 12 :: READ X$ 490 FOR J=0 TO 11 :: FOR K=0 TO 1 500 L=2*J+K+1 :: D(I+J,K)=ASC(SEG$(X$,L,1))-49 510 NEXT K :: NEXT J :: NEXT I 520 RETURN 530 DATA 171:1A1C1E1M101P2>2@2B2J 540 DATA 393<3=3?3G474:4=4?4A4G40 550 DATA 4P5@5B5D5J696<6C6E6M7=7A 560 DATA 7C71707P8>8B8D8J9?9E9K:? 570 DATA :A:E:K:O:P;>;@;D;J<=<C<I 580 DATA =G=I=O>F>H>J?G?K?P@F@J@L 590 DATA AGAIAKANAOAPBHBJBNCICMCP 600 DATA DJDLDNEKEMEOFRFWGSGWHTHW 610 DATA IRIXJSJXKTKXLRLVMSHYNTNY 620 REM compute double figure fields•••••••••• 630 TC=4 :: TN=0 640 FOR I=0 TO 4 :: C(SF(D(DF1,0),I))=1 :: NEXT I 650 FOR I=0 T0 4 :: SF1=SF(D(DF1,1),I) 660 IF C(SF1)=1 THEN 680 670 DF(NF,TN)=SF1 :: TN=TN+1 :: GOTO 690 680 DF(NF,TC)=SF1 :: TC=TC+1 .. C(SF1)=0 690 NEXT I 700 FOR I=0 TO 4 :: SF1=SF(D(DF1,0),I) 710 IF C(SF1)=I THEN DF(NF,TN)=SF1 :: TN=TN+1 :: C(SF1)=0 720 NEXT I :: RETURN 730 REM 740 REM display board********** 750 PRINT " " 760 FOR I=0 TO 4 :: FOR J=0 TO 4 770 F=5*1+J 780 IF B(F)=0 THEN PRINT " "; 790 IF B(F)=1 THEN PRINT "P"; 800 IF B(F)=10 THEN PRINT "C"; 810 NEXT J :: PRINT 5-I :: NEXT I 820 PRINT 830 PRINT "ABCDE" 840 PRINT " " 850 RETURN 860 REM determine owner of sf's********** 870 OM=-1 :: WM=-1 880 FOR SF1=0 TO 41 890 P=B(SF(SF1,0))+B(SF(SF1,1))+B(SF(SF1,2))+B(SF(SF1,3))+B(SF(SF1,4)) 900 IF P=0 OR P=10 OR P=20 OR P=30 THEN SO(SF1)=10 :: GOTO 1000 910 IF P<>40 THEN 950 920 GOSUB 1010 930 GOSUB 1050 940 WM=1 :: SF1=41 :: GOTO 1000 950 IF P>20 OR P<3 OR P=11 OR P=12 THEN SO(SF1)=0 :: GOTO 1000 960 SO(SF1)=1 970 IF P=4 AND OM=-1 THEN GOSUB 1010 980 IF P=14 THEN GOSUB 1050 990 IF P=S THEN SF1=41 1000 NEXT SF1 :: RETURN 1010 REM determine obligatory move********** 1020 FOR I=0 TO 4 1030 IF B(SF(SF1,I))=0 THEN OM=SF(SF1,I) 1040 NEXT I :: RETURN 1050 REM determine pinned checker********** 1060 FOR I=0 TO 4 1070 IF B(SF(SF1,I))<>10 THEN 1110 1080 FOR J=0 TO CC1-1 1090 IF SF(SF1,I)=CC(J,0)THEN CC(J,1)=1 1100 NEXT J 1110 NEXT I 1120 RETURN 1130 REM determine interesting df's******** 1140 NC=0 :: NP=0 :: NF=0 1150 FOR I=0 TO 15 1160 DF(I,8)=-1 1170 DF(I,7)=0 1180 NEXT I 1190 FOR DF1=0 TO 107 1200 O1=SO(D(DF1,0)) :: 02=SO(D(DF1,1)) 1210 IF 01<>02 OR 01=0 OR 02=0 THEN 1330 1220 GOSUB 620 1230 GOSUB 80 1240 IF P=4 OR P=14 THEN DFINF,71=1 :: GOTO 1270 1250 IF 01=1 OR P<=DF(NF,8)THEN 1330 1260 DF(NF,7)=10 1270 DF(NF,S)=P 1280 NF=0 1290 FOR I=0 TO 15 1300 IF DF(I,8)>=DF(NF,8)THEN 1320 1310 IF DF(I,7)=0 OR DF(I,7)=10 THEN NF=I 1320 NEXT I 1330 NEXT DF1 1340 RETURN 1350 REM 1360 REM determine strategic value of move 1370 IF WM=1 THEN 1520 1380 MC=0 :: N2=0 1390 FOR NF=0 TO 1 1400 IF DF(NF,7)=0 THEN 1460 1410 GOSUB 80 1420 IF DF(NF,7)=1 THEN 1450 1430 IF P=MC THEN N2=N2+1 1440 IF P>MC THEN MC=P :: N2=1 1450 IF P=4 THEN NF=15 1460 NEXT NF 1470 IF PP=-1 THEN 1520 1480 IF P=4 THEN RETURN 1490 IF MC<MP THEN RETURN 1500 IF MC=MP AND N2<N1 THEN RETURN 1510 IF MC=MP AND N2=N1 AND RND<.5 THEN RETURN 1520 MP=MC :: N1=N2 1530 PP=CP :: PT=CT 1540 RETURN 1550 REM 1560 REM Player move******* 1570 IF PC<5 THEN 1610 1580 PRINT "WHICH CHECKER 00 YOU WANT TO MOVE" 1590 GOSUB 1690 :: PT=X 1600 IF B(PT)<>1 THEN PRINT "NOT POSSIBLE" :: GOTO 1580 1610 PRINT "WHERE DO YOU PUT YOUR CHECKER" 1620 GOSUB 1690 1: PP=X 1630 IF B(PP)<>0 THEN PRINT "NOT POSSIBLE" :: GOTO 1610 1640 IF PC=5 THEN B(PT)=0 1650 IF PC<5 THEN PC=PC+1 1660 B(PP)=1 1670 GOSUB 740 1680 RETURN 1690 REM input********** 1700 INPUT X$:: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1):: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-5*VAL(D$)-40 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 1760 REM computer move********** 1770 IF CC1<5 THEN PT=CC1 :: CC1=CC1+1 :: GOTO 1830 1780 PRINT "I TAKE ";CHR$(65+PT-INT(PT/5)*5);5-INT(PT/5) 1790 B(PT)=0 1800 FOR CI=0 TO 4 1810 IF CC(CI,0)=PT THEN PT=CI :: CI=4 1820 NEXT CI 1830 PRINT "I PUT IT AT ";CHR$(65+PP-INT(PP/5)*5);5-INT(PP/5) 1840 B(PP)=10 :: CC(PT,0)=PP 1850 GOSUB 740 1860 RETURN 1870 REM main program********** 1880 PRINT "PLEASE WAIT" 1890 GOSUB 210 1900 GOSUB 470 1910 CC1=0 :: PC=0 1920 PP=12 :: GOTO 2140 1930 FOR I=0 TO 4 :: CC(I,1)=0 :: NEXT I 1940 GOSUB 860 1950 IF P=5 THEN END 1960 IF WM=1 THEN 1960 1970 GOSUB 1130 1980 MP=0 :: N1=0 :: PP=-1 1990 BF=0 :: EF=24 2000 IF OM<>-1 THEN BF=OM :: EF=OM 2010 FOR CP=BF TO EF 2020 IF B(CP)<>0 THEN 2130 2040 B(CP)=10 2050 IF CC1<5 THEN GOSUB 1360 :: GOTO 2120 2060 FOR CI=0 TO 4 2070 IF CC(CI,1) THEN 2110 2080 CT=CC(CI,0) :: B(CT)=0 2090 GOSUB 1360 2100 B(CT)=10 2110 NEXT CI 2120 B(CP)=0 2130 NEXT CP 2140 GOSUB 1760 2150 IF WM=1 THEN END 2160 GOSUB 1560 2170 PRINT "PLEASE WAIT" 2180 GOTO 1930 Edited January 18, 2022 by oddemann Bugs Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 10 minutes ago, oddemann said: Anyway, I looked at... "Here Lives/QUI VIVE" and I am stomped at 1700, I think most of the bugs are out. 1600 IF B(PT)<>1 THEN PRINT "N(;.,. POSSIBLE" : : GOTO 1580 1680 RETURN 1690 REM input********** 1700 INPUT X$:: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1):: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-S*VAL(D$)-40 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 should be 1600 IF B(PT)<>1 THEN PRINT "NOT POSSIBLE" : : GOTO 1580 <<----changed 1680 RETURN 1690 REM input********** 1700 INPUT X$:: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1):: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-5*VAL(D$)-40 <<----changed 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 ...lee 1 Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 Thx, @Lee Stewart Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 (edited) Escher (code listing) So... since there are code listing... why not try Escher, but it is buggy! Maybe EVEN if the code is to found, typed in... maybe it is still buggy? Escher is not working as it should. So more eyes are needed on this... Spoiler 10 REM TI ESCHER GAME 15 CALL CLEAR 20 DATA 0000000000000000,0000000000000000,0000000000000000,0000000000000000 30 DATA 8080808080808080,FF00000000000000,0101010101010101,00000000000000FF 40 DATA 2020202020202020,0000FF0000000000,0404040404040404,0000000000FF0000 50 DATA 1010101010101010,000000FF00000000,8080808080808080,00000000FF000000 60 DATA C0C0C0C0C0C0C0C0,FFFF000000000000,0303030303030303,000000000000FFFF 70 DATA F0F0F0F0F0F0F0F0,FFFFFFFF00000000,0F0F0F0F0F0F0F0F,00000000FFFFFFFF 80 DATA 8040201008040201,0102040810204080,8040201008040201,0102040810204080 90 DATA 101020C000000000,8080403000000000,0000000030408080,00000000C0201010 100 DATA FFFEFCF8F0E0C080,FF7F3F1F0F070301,0103070F1F3F7FFF,80C0E0F0F8FCFEFF 110 DATA F0F0F0F000000000,F0F0F0F000000000,000000000F0F0F0F,00000000F0F0F0F0 120 DATA 00183C7E7E3C1800,00183C7E7E3C1800,00183C7E7E3C1800,00183C7E7E3C1800 130 DATA 8142241818244281,8142241818244281,8142241818244281,8142241818244281 140 DATA 08080808FF080808,10101010FF101010,101010FF10101010,101010FF10101010 150 DATA AA55AA55AA55AA55,55AA55AA55AA55AA,AA55AA55AA55AA55,55AA55AA55AA55AA 160 DATA F0F0F0F00F0F0F0F,0F0F0F0FF0F0F0F0,F0F0F0F00F0F0F0F,0F0F0F0FF0F0F0F0 165 REM Trying to bug it... 15*4=60 - should be OK, hmmm? 170 FOR TEL=96 TO 155 180 READ X$ 190 CALL CHAR(TEL,X$) 200 NEXT TEL 210 REM INPUT BASIC SQUARE 220 PRINT "YOU HAVE THE FOLLOWING":" CHARACTERS:" 230 FOR TEL=96 TO 155 STEP 4 240 PRINT TEL; 250 CALL HCHAR(24,10,TEL) 260 PRINT 270 NEXT TEL 280 INPUT "SIZE OF BASIC SQUARE(3-8)":GR 290 IF(GR<3)+(GR>8)<>0 THEN 280 300 HH=INT(24/GR) 310 HHH=HH*HH 320 DIM D(64) 330 DIM RI(64) 340 II=0 350 FOR CC=1 TO GR*GR 360 PRINT "GRAPHIC NR:";CC; 370 INPUT D(CC) 380 IF(D(CC)<96)+(D(CC)>155)+(D(CC)/4-INT(D(CC))/4<>0)<>0 THEN 360 390 NEXT CC 400 REM INPUT DIRECTIONS 410 FOR CC=1 TO HHH 420 PRINT "DIRECTION OF SQUARE ";CC;"(0-3): "; 430 INPUT RI(CC) 440 IF(RI(CC)<0)+(RI(CC)>3)<>0 THEN 420 450 NEXT CC 460 REM DRAW ESCHER PICTURE 470 CALL CLEAR 480 AAA=0 490 FOR OB1=1 TO HH*GR STEP GR 500 FOR OB2=4 TO HH*GR STEP GR 510 AAA=AAA+1 520 I=0 530 ON RI(AAA)+1 GOSUB 580,640,700,760 540 NEXT OB2 550 NEXT OB1 560 GOTO 560 570 END 580 FOR C1=OB1 TO OB1+GR-1 590 FOR C2=OB2 TO OB2+GR-1 600 GOSUB 820 610 NEXT C2 620 NEXT C1 630 RETURN 640 FOR C2=OB2+GR-1 TO OB2 STEP -1 650 FOR C1=OB1 TO OB1+GR-1 660 GOSUB 820 670 NEXT C1 680 NEXT C2 690 RETURN 700 FOR C1=OB1+GR-1 TO OB1 STEP -1 710 FOR C2=OB2+GR-1 TO OB2 STEP -1 720 GOSUB 820 730 NEXT C2 740 NEXT C1 750 RETURN 760 FOR C2=OB2 TO OB2+GR-1 770 FOR C1=OB1+GR-1 TO OB1 STEP -1 780 GOSUB 820 790 NEXT C1 800 NEXT C2 810 RETURN 820 I=I+1 830 CALL HCHAR(C1,C2,D(I)+RI(AAA)) 840 RETURN Edited January 18, 2022 by oddemann Bugs even in the text :p Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted January 18, 2022 Share Posted January 18, 2022 2 hours ago, oddemann said: "Here Lives/QUI VIVE" I have fixed lot of bugs in the listings comparing the published one line per line but still not perfect. Will need to search the TYPO Spoiler 10 REM TI(EXTENDED)-QUI VIVE 20 CALL CLEAR 30 RANDOMIZE 40 DIM SF(41,4),SO(41) 50 DIM D(107,1),DF(15,8) 60 DIM CC(4,1),B(24),C(24) 70 GOTO 1870 80 REM compute points of df********** 90 GV=0 :: P1=0 :: P2=0 :: C1=0 :: C2=0 100 D1=B(DF(NF,0)) :: D2=B(DF(NF,1)) 110 IF D1=1 OR D2=1 THEN P1=1 120 IF D1=10 OR D2=10 THEN C1=10 130 D1=B(DF(NF,2)) :: D2=B(DF(NF,3)) 140 IF D1=1 OR D2=1 THEN P2=1 150 IF D1=10 OR D2=10 THEN C2=10 160 GV=B(DF(NF,4))+B(DF(NF,5))+B(DF(NF,6)) 170 P=GV+P1+P2+C1+C2 180 IF GV=30 AND(C1=0 OR C2=0)THEN P=P-10 190 IF GV=3 AND(P1=0 OR P2=0)THEN P=P-1 200 RETURN 210 REM initialize single figures (sf) 220 FOR I=0 TO 41 :: READ X$ 230 FOR J=1 TO 5 240 SF(I,J-1)=ASC(SEG$(X$,J,1))-65 250 NEXT J :: NEXT I :: RETURN 260 REM wings(AV<>)***** 270 DATA UQMSY,PLHNT,KGCIO 280 DATA AGMIE,FLRNJ,KQWSO 290 DATA AGMQU,BHNRV,CIOSW 300 DATA EIMSY,DHLRX,CGKQW 310 REM times(X)***** 320 DATA ACGKM,BDHLN,CEIMO 330 DATA FLHPR,GIMQS,HJNRT 340 DATA KMQUW,LNRVX,MOSWY 350 REM plus(+)***** 360 DATA BFGHL,CGHIM,DHIJN 370 DATA GKLMQ,HLMNR,IMNOS 380 DATA LPQRV,MQRSW,NRSTX 390 REM diagonals(\/) 400 DATA AGMSY,EIMQU 410 REM columns(I)***** 420 DATA AFKPU,BGLQV,CHMRW 430 DATA DINSX,EJOTY 440 REM rows(-)***** 450 DATA ABCDE,FGHIJ,KLMNO 460 DATA PQRST,UVWXY 470 REM initialize double figures (df) 480 FOR I=0 TO 107 STEP 12 :: READ X$ 490 FOR J=0 TO 11 :: FOR K=0 TO 1 500 L=2*J+K+1 :: D(I+J,K)=ASC(SEG$(X$,L,1))-49 510 NEXT K :: NEXT J :: NEXT I 520 RETURN 530 DATA 171:1A1C1E1M101P2>2@2B2J 540 DATA 393<3=3?3G474:4=4?4A4G4O 550 DATA 4P5@5B5D5J696<6C6E6M7=7A 560 DATA 7C7I7O7P8>8B8D8J9?9E9K:? 570 DATA :A:E:K:O:P;>;@;D;J<=<C<I 580 DATA =G=I=O>F>H>J?G?K?P@F@J@L 590 DATA AGAIAKAMAOAPBHBJBNCICMCP 600 DATA DJDLDNEKEMEOFRFWGSGWHTHW 610 DATA IRIXJSJXKTKXLRLYMSMYNTNY 620 REM compute double figure fields 630 TC=4 :: TN=0 640 FOR I=0 TO 4 :: C(SF(D(DF1,0),I))=1 :: NEXT I 650 FOR I=0 TO 4 :: SF1=SF(D(DF1,1),I) 660 IF C(SF1)=1 THEN 680 670 DF(NF,TN)=SF1 :: TN=TN+1 :: GOTO 690 680 DF(NF,TC)=SF1 :: TC=TC+1 :: C(SF1)=0 690 NEXT I 700 FOR I=0 TO 4 :: SF1=SF(D(DF1,0),I) 710 IF C(SF1)=1 THEN DF(NF,TN)=SF1 :: TN=TN+1 :: C(SF1)=0 720 NEXT I :: RETURN 730 REM 740 REM display board********** 750 PRINT " " 760 FOR I=0 TO 4 :: FOR J=0 TO 4 770 F=5*I+J 780 IF B(F)=0 THEN PRINT " "; 790 IF B(F)=1 THEN PRINT "P"; 800 IF B(F)=10 THEN PRINT "C"; 810 NEXT J :: PRINT 5-I :: NEXT I 820 PRINT " " 830 PRINT "ABCDE" 840 PRINT " " 850 RETURN 860 REM determine owner of sf's********** 870 OM=-1 :: WM=-1 880 FOR SF1=0 TO 41 890 P=B(SF(SF1,0))+B(SF(SF1,1))+B(SF(SF1,2))+B(SF(SF1,3))+B(SF(SF1,4)) 900 IF P=0 OR P=10 OR P=20 OR P=30 THEN SO(SF1)=10 :: GOTO 1000 910 IF P<>40 THEN 950 920 GOSUB 1010 930 GOSUB 1050 940 WM=1 :: SF1=41 :: GOTO 1000 950 IF P>20 OR P<3 OR P=11 OR P=12 THEN SO(SF1)=0 :: GOTO 1000 960 SO(SF1)=1 970 IF P=4 AND OM=-1 THEN GOSUB 1010 980 IF P=14 THEN GOSUB 1050 990 IF P=5 THEN SF1=41 1000 NEXT SF1 :: RETURN 1010 REM determine obligatory move********** 1020 FOR I=0 TO 4 1030 IF B(SF(SF1,I))=0 THEN OM=SF(SF1,I) 1040 NEXT I :: RETURN 1050 REM determine pinned checker********** 1060 FOR I=0 TO 4 1070 IF B(SF(SF1,I))<>10 THEN 1110 1080 FOR J=0 TO CC1-1 1090 IF SF(SF1,I)=CC(J,0)THEN CC(J,1)=1 1100 NEXT J 1110 NEXT I 1120 RETURN 1130 REM determine interesting df's******** 1140 NC=0 :: NP=0 :: NF=0 1150 FOR I=0 TO 15 1160 DF(I,8)=-1 1170 DF(I,7)=0 1180 NEXT I 1190 FOR DF1=0 TO 107 1200 O1=SO(D(DF1,0)) :: O2=SO(D(DF1,1)) 1210 IF O1<>O2 OR O1=0 OR O2=0 THEN 1330 1220 GOSUB 620 1230 GOSUB 80 1240 IF P=4 OR P=14 THEN DF(NF,7)=1 :: GOTO 1270 1250 IF O1=1 OR P<=DF(NF,8)THEN 1330 1260 DF(NF,7)=10 1270 DF(NF,8)=P 1280 NF=0 1290 FOR I=0 TO 15 1300 IF DF(I,8)>=DF(NF,8)THEN 1320 1310 IF DF(I,7)=0 OR DF(I,7)=10 THEN NF=I 1320 NEXT I 1330 NEXT DF1 1340 RETURN 1350 REM 1360 REM determine strategic value of move 1370 IF WM=1 THEN 1520 1380 MC=0 :: N2=0 1390 FOR NF=0 TO 15 1400 IF DF(NF,7)=0 THEN 1460 1410 GOSUB 80 1420 IF DF(NF,7)=1 THEN 1450 1430 IF P=MC THEN N2=N2+1 1440 IF P>MC THEN MC=P :: N2=1 1450 IF P=4 THEN NF=15 1460 NEXT NF 1470 IF PP=-1 THEN 1520 1480 IF P=4 THEN RETURN 1490 IF MC<MP THEN RETURN 1500 IF MC=MP AND N2<N1 THEN RETURN 1510 IF MC=MP AND N2=N1 AND RND<.5 THEN RETURN 1520 MP=MC :: N1=N2 1530 PP=CP :: PT=CT 1540 RETURN 1550 REM 1560 REM Player move******* 1570 IF PC<5 THEN 1610 1580 PRINT "WHICH CHECKER DO YOU WANT TO MOVE" 1590 GOSUB 1690 :: PT=X 1600 IF B(PT)<>1 THEN PRINT "NOT POSSIBLE" :: GOTO 1580 1610 PRINT "WHERE DO YOU PUT YOUR CHECKER" 1620 GOSUB 1690 :: PP=X 1630 IF B(PP)<>0 THEN PRINT "NOT POSSIBLE" :: GOTO 1610 1640 IF PC=5 THEN B(PT)=0 1650 IF PC<5 THEN PC=PC+1 1660 B(PP)=1 1670 GOSUB 740 1680 RETURN 1690 REM input********** 1700 INPUT X$ :: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1) :: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-5*VAL(D$)-40 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 1760 REM computer move********** 1770 IF CC1<5 THEN PT=CC1 :: CC1=CC1+1 :: GOTO 1830 1780 PRINT "I TAKE ";CHR$(65+PT-INT(PT/5)*5);5-INT(PT/5) 1790 B(PT)=0 1800 FOR CI=0 TO 4 1810 IF CC(CI,0)=PT THEN PT=CI :: CI=4 1820 NEXT CI 1830 PRINT "I PUT IT AT ";CHR$(65+PP-INT(PP/5)*5);5-INT(PP/5) 1840 B(PP)=10 :: CC(PT,0)=PP 1850 GOSUB 740 1860 RETURN 1870 REM main program********** 1880 PRINT "PLEASE WAIT" 1890 GOSUB 210 1900 GOSUB 470 1910 CC1=0 :: PC=0 1920 PP=12 :: GOTO 2140 1930 FOR I=0 TO 4 :: CC(I,1)=0 :: NEXT I 1940 GOSUB 860 1950 IF P=5 THEN END 1960 IF WM=1 THEN 1960 1970 GOSUB 1130 1980 MP=0 :: N1=0 :: PP=-1 1990 BF=0 :: EF=24 2000 IF OM<>-1 THEN BF=OM :: EF=OM 2010 FOR CP=BF TO EF 2020 IF B(CP)<>0 THEN 2130 2040 B(CP)=10 2050 IF CC1<5 THEN GOSUB 1360 :: GOTO 2120 2060 FOR CI=0 TO 4 2070 IF CC(CI,1)THEN 2110 2080 CT=CC(CI,0) :: B(CT)=0 2090 GOSUB 1360 2100 B(CT)=10 2110 NEXT CI 2120 B(CP)=0 2130 NEXT CP 2140 GOSUB 1760 2150 IF WM=1 THEN END 2160 GOSUB 1560 2170 PRINT "PLEASE WAIT" 2180 GOTO 1930 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted January 18, 2022 Share Posted January 18, 2022 2 hours ago, oddemann said: Escher (code listing) I have tested the one already published in the ti99iuc page and seems to work. Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 9 minutes ago, ti99iuc said: I have tested the one already published in the ti99iuc page and seems to work. Don't tell anyone... I was trying to run it in Ex B 2 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 2 hours ago, oddemann said: Now with last bug fix by @Lee Stewart But it still stops at 1700 (for me) Fixes in lines 110, 120, 140, 270, 300, 400, 540, 560, 590, 610, 650, 680, 710, 770, 820, 990, 1200, 1210, 1240, 1250, 1270, 1580, 1600, 1620, 1390: Spoiler 10 REM TI EXTENDED-QUI VIVE 20 CALL CLEAR 30 RANDOMIZE 40 DIM SF(41,4),SO(41) 50 DIM D(107,1),DF(15,8) 60 DIM CC(4,1),B(24),C(24) 70 GOTO 1870 80 REM compute points of df********** 90 GV=0 :: P1=0 :: P2=0 :: C1=0 :: C2=0 100 D1=B(DF(NF,0)):: D2=B(DF(NF,1)) 110 IF D1=1 OR D2=1 THEN P1=1 120 IF D1=10 OR D2=10 THEN C1=10 130 D1=B(DF(NF,2)):: D2=B(DF(NF,3)) 140 IF D1=1 OR D2=1 THEN P2=1 150 IF D1=10 OR D2=10 THEN C2=10 160 GV=B(DF(NF,4))+B(DF(NF,5))+B(DF(NF,6)) 170 P=GV+P1+P2+C1+C2 180 IF GV=30 AND(C1=0 OR C2=0)THEN P=P-10 190 IF GV=3 AND(P1=0 OR P2=0)THEN P=P-1 200 RETURN 210 REM initialize single figu~es (sf) 220 FOR I=0 TO 41 :: READ X$ 230 FOR J=1 TO 5 240 SF(I,J-1)=ASC(SEG$(X$,J,1))-65 250 NEXT J :: NEXT I :: RETURN 260 REM wings(AV<>)***** 270 DATA UQMSY,PLHNT,KGCIO 280 DATA AGMIE,FLRNJ,KQWSO 290 DATA AGMQU,BHNRV,CIOSW 300 DATA EIMSY,DHLRX,CGKQW 310 REM times(X)***** 320 DATA ACGKM,BDHLN,CEIMO 330 DATA FLHPR,GIMQS,HJNRT 340 DATA KMQUW,LNRVX,MOSWY 350 REM plus(+)***** 360 DATA BFGHL,CGHIM,DHIJN 370 DATA GKLMQ,HLMNR,IMNOS 380 DATA LPQRV,MQRSW,NRSTX 390 REM diagonals(\/) 400 DATA AGMSY,EIMQU 410 REM columns(I)***** 420 DATA AFKPU,BGLQV,CHMRW 430 DATA DINSX,EJOTY 440 REM rows(-)***** 450 DATA ABCDE,FGHIJ,KLMNO 460 DATA PQRST,UVWXY 470 REM initialize double figures (df) 480 FOR I=0 TO 107 STEP 12 :: READ X$ 490 FOR J=0 TO 11 :: FOR K=0 TO 1 500 L=2*J+K+1 :: D(I+J,K)=ASC(SEG$(X$,L,1))-49 510 NEXT K :: NEXT J :: NEXT I 520 RETURN 530 DATA 171:1A1C1E1M1O1P2>2@2B2J 540 DATA 393<3=3?3G474:4=4?4A4G4O 550 DATA 4P5@5B5D5J696<6C6E6M7=7A 560 DATA 7C717O7P8>8B8D8J9?9E9K:? 570 DATA :A:E:K:O:P;>;@;D;J<=<C<I 580 DATA =G=I=O>F>H>J?G?K?P@F@J@L 590 DATA AGAIAKAMAOAPBHBJBNCICMCP 600 DATA DJDLDNEKEMEOFRFWGSGWHTHW 610 DATA IRIXJSJXKTKXLRLYMSMYNTNY 620 REM compute double figure fields•••••••••• 630 TC=4 :: TN=0 640 FOR I=0 TO 4 :: C(SF(D(DF1,0),I))=1 :: NEXT I 650 FOR I=0 TO 4 :: SF1=SF(D(DF1,1),I) 660 IF C(SF1)=1 THEN 680 670 DF(NF,TN)=SF1 :: TN=TN+1 :: GOTO 690 680 DF(NF,TC)=SF1 :: TC=TC+1 :: C(SF1)=0 690 NEXT I 700 FOR I=0 TO 4 :: SF1=SF(D(DF1,0),I) 710 IF C(SF1)=1 THEN DF(NF,TN)=SF1 :: TN=TN+1 :: C(SF1)=0 720 NEXT I :: RETURN 730 REM 740 REM display board********** 750 PRINT " " 760 FOR I=0 TO 4 :: FOR J=0 TO 4 770 F=5*I+J 780 IF B(F)=0 THEN PRINT " "; 790 IF B(F)=1 THEN PRINT "P"; 800 IF B(F)=10 THEN PRINT "C"; 810 NEXT J :: PRINT 5-I :: NEXT I 820 PRINT " " 830 PRINT "ABCDE" 840 PRINT " " 850 RETURN 860 REM determine owner of sf's********** 870 OM=-1 :: WM=-1 880 FOR SF1=0 TO 41 890 P=B(SF(SF1,0))+B(SF(SF1,1))+B(SF(SF1,2))+B(SF(SF1,3))+B(SF(SF1,4)) 900 IF P=0 OR P=10 OR P=20 OR P=30 THEN SO(SF1)=10 :: GOTO 1000 910 IF P<>40 THEN 950 920 GOSUB 1010 930 GOSUB 1050 940 WM=1 :: SF1=41 :: GOTO 1000 950 IF P>20 OR P<3 OR P=11 OR P=12 THEN SO(SF1)=0 :: GOTO 1000 960 SO(SF1)=1 970 IF P=4 AND OM=-1 THEN GOSUB 1010 980 IF P=14 THEN GOSUB 1050 990 IF P=5 THEN SF1=41 1000 NEXT SF1 :: RETURN 1010 REM determine obligatory move********** 1020 FOR I=0 TO 4 1030 IF B(SF(SF1,I))=0 THEN OM=SF(SF1,I) 1040 NEXT I :: RETURN 1050 REM determine pinned checker********** 1060 FOR I=0 TO 4 1070 IF B(SF(SF1,I))<>10 THEN 1110 1080 FOR J=0 TO CC1-1 1090 IF SF(SF1,I)=CC(J,0)THEN CC(J,1)=1 1100 NEXT J 1110 NEXT I 1120 RETURN 1130 REM determine interesting df's******** 1140 NC=0 :: NP=0 :: NF=0 1150 FOR I=0 TO 15 1160 DF(I,8)=-1 1170 DF(I,7)=0 1180 NEXT I 1190 FOR DF1=0 TO 107 1200 O1=SO(D(DF1,0)) :: O2=SO(D(DF1,1)) 1210 IF O1<>O2 OR O1=0 OR O2=0 THEN 1330 1220 GOSUB 620 1230 GOSUB 80 1240 IF P=4 OR P=14 THEN DF(NF,7)=1 :: GOTO 1270 1250 IF O1=1 OR P<=DF(NF,8)THEN 1330 1260 DF(NF,7)=10 1270 DF(NF,8)=P 1280 NF=0 1290 FOR I=0 TO 15 1300 IF DF(I,8)>=DF(NF,8)THEN 1320 1310 IF DF(I,7)=0 OR DF(I,7)=10 THEN NF=I 1320 NEXT I 1330 NEXT DF1 1340 RETURN 1350 REM 1360 REM determine strategic value of move 1370 IF WM=1 THEN 1520 1380 MC=0 :: N2=0 1390 FOR NF=0 TO 15 1400 IF DF(NF,7)=0 THEN 1460 1410 GOSUB 80 1420 IF DF(NF,7)=1 THEN 1450 1430 IF P=MC THEN N2=N2+1 1440 IF P>MC THEN MC=P :: N2=1 1450 IF P=4 THEN NF=15 1460 NEXT NF 1470 IF PP=-1 THEN 1520 1480 IF P=4 THEN RETURN 1490 IF MC<MP THEN RETURN 1500 IF MC=MP AND N2<N1 THEN RETURN 1510 IF MC=MP AND N2=N1 AND RND<.5 THEN RETURN 1520 MP=MC :: N1=N2 1530 PP=CP :: PT=CT 1540 RETURN 1550 REM 1560 REM Player move******* 1570 IF PC<5 THEN 1610 1580 PRINT "WHICH CHECKER DO YOU WANT TO MOVE" 1590 GOSUB 1690 :: PT=X 1600 IF B(PT)<>1 THEN PRINT "NOT POSSIBLE" :: GOTO 1580 1610 PRINT "WHERE DO YOU PUT YOUR CHECKER" 1620 GOSUB 1690 :: PP=X 1630 IF B(PP)<>0 THEN PRINT "NOT POSSIBLE" :: GOTO 1610 1640 IF PC=5 THEN B(PT)=0 1650 IF PC<5 THEN PC=PC+1 1660 B(PP)=1 1670 GOSUB 740 1680 RETURN 1690 REM input********** 1700 INPUT X$:: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1):: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-5*VAL(D$)-40 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 1760 REM computer move********** 1770 IF CC1<5 THEN PT=CC1 :: CC1=CC1+1 :: GOTO 1830 1780 PRINT "I TAKE ";CHR$(65+PT-INT(PT/5)*5);5-INT(PT/5) 1790 B(PT)=0 1800 FOR CI=0 TO 4 1810 IF CC(CI,0)=PT THEN PT=CI :: CI=4 1820 NEXT CI 1830 PRINT "I PUT IT AT ";CHR$(65+PP-INT(PP/5)*5);5-INT(PP/5) 1840 B(PP)=10 :: CC(PT,0)=PP 1850 GOSUB 740 1860 RETURN 1870 REM main program********** 1880 PRINT "PLEASE WAIT" 1890 GOSUB 210 1900 GOSUB 470 1910 CC1=0 :: PC=0 1920 PP=12 :: GOTO 2140 1930 FOR I=0 TO 4 :: CC(I,1)=0 :: NEXT I 1940 GOSUB 860 1950 IF P=5 THEN END 1960 IF WM=1 THEN 1960 1970 GOSUB 1130 1980 MP=0 :: N1=0 :: PP=-1 1990 BF=0 :: EF=24 2000 IF OM<>-1 THEN BF=OM :: EF=OM 2010 FOR CP=BF TO EF 2020 IF B(CP)<>0 THEN 2130 2040 B(CP)=10 2050 IF CC1<5 THEN GOSUB 1360 :: GOTO 2120 2060 FOR CI=0 TO 4 2070 IF CC(CI,1) THEN 2110 2080 CT=CC(CI,0) :: B(CT)=0 2090 GOSUB 1360 2100 B(CT)=10 2110 NEXT CI 2120 B(CP)=0 2130 NEXT CP 2140 GOSUB 1760 2150 IF WM=1 THEN END 2160 GOSUB 1560 2170 PRINT "PLEASE WAIT" 2180 GOTO 1930 ...lee Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted January 18, 2022 Share Posted January 18, 2022 (edited) @Lee Stewart, I also found errors in 530 and 560 but still have problems during gameplay, I have an error in 1200 after the second move. Have you tried to play too? Edited January 18, 2022 by ti99iuc Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 38 minutes ago, ti99iuc said: @Lee Stewart, I also found errors in 530 and 560 but still have problems during gameplay, I have an error in 1200 after the second move. Have you tried to play too? I am thinking that the game should get re-worked. Not this scrolling board. But a static board. Would look much better. 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 (edited) 58 minutes ago, ti99iuc said: @Lee Stewart, I also found errors in 530 ... What was the error at 530? 58 minutes ago, ti99iuc said: I have an error in 1200 after the second move. I had one of those (subscript was -1), which turned out to be a ‘0’ instead of an ‘O’ in 560. None of the characters in DATA statements 530 – 610 can be lower than ASCII for ‘1’ (49, hex 31) or higher than ASCII for ‘Z’ (90, hex 5A) because statement 500 will generate a number lower than 0 or higher than 41 for D(x,y) in such circumstances. That is a problem because D is a subscript array whose elements are used in 640, 650, 700, and 1200. If one of those statements runs into a subscript < 1 or > 41, it will throw an error. 58 minutes ago, ti99iuc said: Have you tried to play too? Yes. The computer’s turn takes entirely too long, though. As I write this, it has been stuck on the computer’s turn for about an hour! That could be due to other bugs, I suppose. As a matter of fact, the computer should win on this move because I did not know the object of the game when I started playing and set up a winning position for the computer on my last move, so there must be at least one other bug. ...lee Edited January 18, 2022 by Lee Stewart CLARIFICATION & CORRECTION 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 19 minutes ago, oddemann said: I am thinking that the game should get re-worked. Not this scrolling board. But a static board. Would look much better. I agree wholeheartedly! And...the board should be a graphic with graphic checkers like the Othello game. ...lee 1 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted January 18, 2022 Share Posted January 18, 2022 (edited) Yes Lee, I had an other error of an I instead of 1. and a 0 as an O in 530. So I fixed. thanks- probably there is another bug indeed, the computer need too much time to move, I suspect the problem is here: I also have an Italian version of this same game but converted in TI-BASIC and it seems to be faster than this XB. The problem is that, in both of the version, the computer not seems to have a strategy to play for win but it just wait the right moment to block the win of the player. Edited January 18, 2022 by ti99iuc Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 6 minutes ago, ti99iuc said: The problem is that, in both of the version, the computer not seems to have a strategy to play for win but it just wait the right moment to block the win of the player. There also does not appear to be an announcement of the winner—the game just freezes. I finally stopped my game only to find that it was in an infinite loop at 1960. The computer must have won, but there was no indication of that. ...lee Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 If I do all the graphic, anyone how will take on the rest? I make the board, grid, tokens, set numbers and make it really pretty. Could also set up the text and all so that all the visual parts are done. (Started to make a test pic) Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 18, 2022 Share Posted January 18, 2022 21 minutes ago, oddemann said: If I do all the graphic, anyone how will take on the rest? I make the board, grid, tokens, set numbers and make it really pretty. Could also set up the text and all so that all the visual parts are done. (Started to make a test pic) Perhaps. I need to figure out how the program actually works, first. ...lee Quote Link to comment Share on other sites More sharing options...
oddemann Posted January 18, 2022 Author Share Posted January 18, 2022 (edited) Test Edited January 18, 2022 by oddemann 3 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted February 1, 2022 Share Posted February 1, 2022 because I have added on the TI99iuc database also the Italian 'translated' version of the 'Qui Vivo' game, it helped to fix the English one that now works perfect. following is the complete final listing code: Spoiler 10 REM TI(EXTENDED)-QUI VIVE 20 CALL CLEAR 30 RANDOMIZE 40 DIM SF(41,4),SO(41) 50 DIM D(107,1),DF(15,8) 60 DIM CC(4,1),B(24),C(24) 70 GOTO 1870 80 REM compute points of df********** 90 GV=0 :: P1=0 :: P2=0 :: C1=0 :: C2=0 100 D1=B(DF(NF,0)) :: D2=B(DF(NF,1)) 110 IF D1=1 OR D2=1 THEN P1=1 120 IF D1=10 OR D2=10 THEN C1=10 130 D1=B(DF(NF,2)) :: D2=B(DF(NF,3)) 140 IF D1=1 OR D2=1 THEN P2=1 150 IF D1=10 OR D2=10 THEN C2=10 160 GV=B(DF(NF,4))+B(DF(NF,5))+B(DF(NF,6)) 170 P=GV+P1+P2+C1+C2 180 IF GV=30 AND(C1=0 OR C2=0)THEN P=P-10 190 IF GV=3 AND(P1=0 OR P2=0)THEN P=P-1 200 RETURN 210 REM initialize single figures (sf) 220 FOR I=0 TO 41 :: READ X$ 230 FOR J=1 TO 5 240 SF(I,J-1)=ASC(SEG$(X$,J,1))-65 250 NEXT J :: NEXT I :: RETURN 260 REM wings(AV<>)***** 270 DATA UQMSY,PLHNT,KGCIO 280 DATA AGMIE,FLRNJ,KQWSO 290 DATA AGMQU,BHNRV,CIOSW 300 DATA EIMSY,DHLRX,CGKQW 310 REM times(X)***** 320 DATA ACGKM,BDHLN,CEIMO 330 DATA FLHPR,GIMQS,HJNRT 340 DATA KMQUW,LNRVX,MOSWY 350 REM plus(+)***** 360 DATA BFGHL,CGHIM,DHIJN 370 DATA GKLMQ,HLMNR,IMNOS 380 DATA LPQRV,MQRSW,NRSTX 390 REM diagonals(\/) 400 DATA AGMSY,EIMQU 410 REM columns(I)***** 420 DATA AFKPU,BGLQV,CHMRW 430 DATA DINSX,EJOTY 440 REM rows(-)***** 450 DATA ABCDE,FGHIJ,KLMNO 460 DATA PQRST,UVWXY 470 REM initialize double figures (df) 480 FOR I=0 TO 107 STEP 12 :: READ X$ 490 FOR J=0 TO 11 :: FOR K=0 TO 1 500 L=2*J+K+1 :: D(I+J,K)=ASC(SEG$(X$,L,1))-49 510 NEXT K :: NEXT J :: NEXT I 520 RETURN 530 DATA 171:1A1C1E1M101P2>2@2B2J 540 DATA 393<3=3?3G474:4=4?4A4G4O 550 DATA 4P5@5B5D5J696<6C6E6M7=7A 560 DATA 7C7I7O7P8>8B8D8J9?9E9K:? 570 DATA :A:E:K:O:P;>;@;D;J<=<C<I 580 DATA =G=I=O>F>H>J?G?K?P@F@J@L 590 DATA AGAIAKAMAOAPBHBJBNCICMCP 600 DATA DJDLDNEKEMEOFRFWGSGWHTHW 610 DATA IRIXJSJXKTKXLRLYMSMYNTNY 620 REM compute double figure fields 630 TC=4 :: TN=0 640 FOR I=0 TO 4 :: C(SF(D(DF1,0),I))=1 :: NEXT I 650 FOR I=0 TO 4 :: SF1=SF(D(DF1,1),I) 660 IF C(SF1)=1 THEN 680 670 DF(NF,TN)=SF1 :: TN=TN+1 :: GOTO 690 680 DF(NF,TC)=SF1 :: TC=TC+1 :: C(SF1)=0 690 NEXT I 700 FOR I=0 TO 4 :: SF1=SF(D(DF1,0),I) 710 IF C(SF1)=1 THEN DF(NF,TN)=SF1 :: TN=TN+1 :: C(SF1)=0 720 NEXT I :: RETURN 730 REM 740 REM display board********** 750 PRINT " " 760 FOR I=0 TO 4 :: FOR J=0 TO 4 770 F=5*I+J 780 IF B(F)=0 THEN PRINT " "; 790 IF B(F)=1 THEN PRINT "P"; 800 IF B(F)=10 THEN PRINT "C"; 810 NEXT J :: PRINT 5-I :: NEXT I 820 PRINT " " 830 PRINT "ABCDE" 840 PRINT " " 850 RETURN 860 REM determine owner of sf's********** 870 OM=-1 :: WM=-1 880 FOR SF1=0 TO 41 890 P=B(SF(SF1,0))+B(SF(SF1,1))+B(SF(SF1,2))+B(SF(SF1,3))+B(SF(SF1,4)) 900 IF P=0 OR P=10 OR P=20 OR P=30 THEN SO(SF1)=10 :: GOTO 1000 910 IF P<>40 THEN 950 920 GOSUB 1010 930 GOSUB 1050 940 WM=1 :: SF1=41 :: GOTO 1000 950 IF P>20 OR P<3 OR P=11 OR P=12 THEN SO(SF1)=0 :: GOTO 1000 960 SO(SF1)=1 970 IF P=4 AND OM=-1 THEN GOSUB 1010 980 IF P=14 THEN GOSUB 1050 990 IF P=5 THEN SF1=41 1000 NEXT SF1 :: RETURN 1010 REM determine obligatory move********** 1020 FOR I=0 TO 4 1030 IF B(SF(SF1,I))=0 THEN OM=SF(SF1,I) 1040 NEXT I :: RETURN 1050 REM determine pinned checker********** 1060 FOR I=0 TO 4 1070 IF B(SF(SF1,I))<>10 THEN 1110 1080 FOR J=0 TO CC1-1 1090 IF SF(SF1,I)=CC(J,0)THEN CC(J,1)=1 1100 NEXT J 1110 NEXT I 1120 RETURN 1130 REM determine interesting df's******** 1140 NC=0 :: NP=0 :: NF=0 1150 FOR I=0 TO 15 1160 DF(I,8)=-1 1170 DF(I,7)=0 1180 NEXT I 1190 FOR DF1=0 TO 107 1200 O1=O2=SO(D(DF1,0)) 1210 IF O1<>O2 OR O1=0 OR O2=0 THEN 1330 1220 GOSUB 620 1230 GOSUB 80 1240 IF P=4 OR P=14 THEN DF(NF,7)=1 :: GOTO 1270 1250 IF O1=1 OR P<=DF(NF,8)THEN 1330 1260 DF(NF,7)=10 1270 DF(NF,8)=P 1280 NF=0 1290 FOR I=0 TO 15 1300 IF DF(I,8)>=DF(NF,8)THEN 1320 1310 IF DF(I,7)=0 OR DF(I,7)=10 THEN NF=I 1320 NEXT I 1330 NEXT DF1 1340 RETURN 1350 REM 1360 REM determine strategic value of move 1370 IF WM=1 THEN 1520 1380 MC=0 :: N2=0 1390 FOR NF=0 TO 15 1400 IF DF(NF,7)=0 THEN 1460 1410 GOSUB 80 1420 IF DF(NF,7)=1 THEN 1450 1430 IF P=MC THEN N2=N2+1 1440 IF P>MC THEN MC=P :: N2=1 1450 IF P=4 THEN NF=15 1460 NEXT NF 1470 IF PP=-1 THEN 1520 1480 IF P=4 THEN RETURN 1490 IF MC<MP THEN RETURN 1500 IF MC=MP AND N2<N1 THEN RETURN 1510 IF MC=MP AND N2=N1 AND RND<.5 THEN RETURN 1520 MP=MC :: N1=N2 1530 PP=CP :: PT=CT 1540 RETURN 1550 REM 1560 REM Player move******* 1570 IF PC<5 THEN 1610 1580 PRINT "WHICH CHECKER DO YOU WANT TO MOVE" 1590 GOSUB 1690 :: PT=X 1600 IF B(PT)<>1 THEN PRINT "NOT POSSIBLE" :: GOTO 1580 1610 PRINT "WHERE DO YOU PUT YOUR CHECKER" 1620 GOSUB 1690 :: PP=X 1630 IF B(PP)<>0 THEN PRINT "NOT POSSIBLE" :: GOTO 1610 1640 IF PC=5 THEN B(PT)=0 1650 IF PC<5 THEN PC=PC+1 1660 B(PP)=1 1670 GOSUB 740 1680 RETURN 1690 REM input********** 1700 INPUT X$ :: IF LEN(X$)<>2 THEN 1750 1710 L$=SEG$(X$,1,1) :: D$=SEG$(X$,2,1) 1720 IF L$<"A" OR L$>"E" OR D$<"1" OR D$>"5" THEN 1750 1730 X=ASC(L$)-5*VAL(D$)-40 1740 RETURN 1750 PRINT "WRONG INPUT,TRY AGAIN" :: GOTO 1700 1760 REM computer move********** 1770 IF CC1<5 THEN PT=CC1 :: CC1=CC1+1 :: GOTO 1830 1780 PRINT "I TAKE ";CHR$(65+PT-INT(PT/5)*5);5-INT(PT/5) 1790 B(PT)=0 1800 FOR CI=0 TO 4 1810 IF CC(CI,0)=PT THEN PT=CI :: CI=4 1820 NEXT CI 1830 PRINT "I PUT IT AT ";CHR$(65+PP-INT(PP/5)*5);5-INT(PP/5) 1840 B(PP)=10 :: CC(PT,0)=PP 1850 GOSUB 740 1860 RETURN 1870 REM main program********** 1880 PRINT "PLEASE WAIT" 1890 GOSUB 210 1900 GOSUB 470 1910 CC1=0 :: PC=0 1920 PP=12 :: GOTO 2140 1930 FOR I=0 TO 4 :: CC(I,1)=0 :: NEXT I 1940 GOSUB 860 1950 IF P=5 THEN END 1960 IF WM=1 THEN PRINT "AS YOU CAN SEE, YOU LOST!!!" :: END 1970 GOSUB 1130 1980 MP=0 :: N1=0 :: PP=-1 1990 BF=0 :: EF=24 2000 IF OM<>-1 THEN BF=OM :: EF=OM 2010 FOR CP=BF TO EF 2020 IF B(CP)<>0 THEN 2130 2030 IF OM<>-1 THEN 2040 2040 B(CP)=10 2050 IF CC1<5 THEN GOSUB 1360 :: GOTO 2120 2060 FOR CI=0 TO 4 2070 IF CC(CI,1)THEN 2110 2080 CT=CC(CI,0) :: B(CT)=0 2090 GOSUB 1360 2100 B(CT)=10 2110 NEXT CI 2120 B(CP)=0 2130 NEXT CP 2140 GOSUB 1760 2150 IF WM=1 THEN END 2160 GOSUB 1560 2170 PRINT "PLEASE WAIT" 2180 GOTO 1930 it was completely missing of the line 2030, and 1960 and 1200 had bugs.@oddemann , i suggest to use this one if you are still working on the version with graphic Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted February 1, 2022 Share Posted February 1, 2022 (edited) I am trying Genius at Work game at the moment but, it release an error and I still can't be able to find how to fix... if someone can help, this is the listing: Spoiler 10 REM TI-GENIUS AT WORK 20 RANDOMIZE 30 FOR B=1 TO 4 40 NR(B)=INT(RND*9+1) 50 NEXT B 60 NR(5)=INT(RND*5+1)*10 70 NR(6)=INT(RND*4+1)*25 80 TARGET=INT(RND*600+200) 90 TI=26 100 REM MAIN PROGRAM******** 110 CALL CLEAR 120 PRINT "THE TARGET NUMBER IS:";TARGET 130 REM EXECUTE************* 140 FOR B=1 TO 6 150 PRINT NR(B); 160 NEXT B 170 PRINT 180 GOSUB 360 190 REM*EXECUTE 200 TH=0 210 AWAY=TARGET 220 FOR B=1 TO 6 230 AWAY=AWAY-NR(B) 240 WH=WH+(TARGET-NR(B)=0) 250 TH=TH+(NR(B)=0) 260 NEXT B 270 IF WH<>-1 THEN 310 280 PRINT "Congratulations!You got it." 290 END 300 IF TH<=-5 THEN 320 318 IF TI>0 THEN 110 320 PRINT "You failed" 330 PRINT "The difference is:";ABS(AWAY) 340 END 350 REM INPUT************** 360 PRINT "Select a number: "; 370 GOSUB 790 380 IF TI<1 THEN RETURN 390 NR1=0 400 FOR A=1 TO 6 410 IF NR(A)<>IN THEN 430 420 NR1=A 430 NEXT A 440 IF NR1<>0 THEN 470 450 PRINT "You don't have this number" 460 GOTO 360 470 PRINT "Select another number: "; 480 GOSUB 790 490 IF TI<1 THEN RETURN 500 NR2=0 510 FOR A=1 TO 6 520 IF NR(A)<>IN THEN 550 530 IF A=NR1 THEN 550 540 NR2=A 550 NEXT A 560 IF NR2<>0 THEN 590 570 PRINT "You don't have this number" 580 GOTO 470 590 PRINT "Select an operation: "; 600 GOSUB 790 610 AW$=CHR$(K) 620 PRINT AW$ 630 IF AW$<>"+" THEN 660 640 NR(NR1)=NR(NR1)+NR(NR2) 650 GOTO 770 660 IF AW$<>"*" THEN 690 670 NR(NR1)=NR(NR1)*NR(NR2) 680 GOTO 770 690 IF AW$<>"/" THEN 720 700 NR(NR1)=NR(NR1)/NR(NR2) 710 GOTO 770 720 IF AW$<>"-" THEN 750 730 NR(NR1)=NR(NR1)-NR(NR2) 740 GOTO 770 750 PRINT "Wrong entry operation" 760 GOTO 590 770 NR(NR2)=0 780 RETURN 790 REM*INPUT* 800 IN=0 810 RET=0 820 IF D=100 THEN 840 830 IF D<>0 THEN 900 840 TI=TI-1 850 IF TI<0 THEN RETURN 860 CALL HCHAR(12,31,TI+97) 870 CALL SOUND(10,880,0) 880 D=0 890 D=D+1 900 CALL KEY(3,K,S) 910 IF S<>0 THEN GOSUB 960 920 IF RET=1 THEN CALL HCHAR(11,31,31) 930 IF RET=1 THEN RETURN 940 IF D<>100 THEN GOTO 890 950 GOTO 840 960 REM*CALCULATE INPUT* 970 IF K<48 THEN 1020 980 IF K>57 THEN 1020 990 PRINT USING "*":(K-48); 1000 IN=10*IN+K-48 1010 GOTO 1030 1020 RET=1 1030 IF K=13 THEN PRINT 1040 RETURN Edited February 1, 2022 by ti99iuc Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted August 17, 2022 Share Posted August 17, 2022 "Terrific GAMES for the Tl99/4A" (Book) by Hal Renko and Sam Edwards Just an update in this thread because thanks to the help of Gianfranco, an Italian user, all the games contained in this book have been published! 😀 The only one game that remaining with bugs is Genius at Work, so if someone of you want help to fix it will be welcomed. 3 Quote Link to comment Share on other sites More sharing options...
Fritz442 Posted August 17, 2022 Share Posted August 17, 2022 Your 'txt' listing is correct, but the 'fiad' is incorrect. I didn't look at the disk file. line in the fiad is: 850 IF TI<>0 THEN RETURN should be: 850 IF TI<0 THEN RETURN Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted August 17, 2022 Share Posted August 17, 2022 ah damn it! You're right thanks @Fritz442 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.