Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape20a_acorn_eu_1991_march.wav » MAKE4
MAKE4
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape20a_acorn_eu_1991_march.wav |
Filename: | MAKE4 |
Read OK: | ✔ |
File size: | 15CF bytes |
Load address: | FFFF1A00 |
Exec address: | FFFF8023 |
Duplicates
There are 6 duplicate copies of this file in the archive:
- AEW website » eug » eug_3_5_discs_Eug-66_A-EUG66.adf » G/CONNECT
- AEW website » mu » mu_5_25_discs_Micro_User_09_01_D-MU09_01.ssd » Make4
- AEW website » eug » eug_5_25_discs_Eug-66_D-EUG66.ssd » G.CONNECT
- AEW website » mu » mu_Micro_User_09_01_MU9-1_B.uef » MAKE4
- Personal collection » Acorn ADFS disks » Electron » Games_1.ADF » Make-4/RUN_THIS
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape20a_acorn_eu_1991_march.wav » MAKE4
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape20b_acorn_eu_1991_march.wav » Make4
File contents
10REM Connect Four 20REM by Malcolm F Wilkins 30REM (c) The Micro User 40REM not for Archimedes 50REM 60ONERROR GOTO 190 70*TV 0 1 80*FX 4 1 90MODE 5 100HIMEM=&5700 110PROCinitialisevars 120PROCsetupcode 130REPEAT 140PROCinitialiseboard 150PROCdrawboard 160PROCgame 170PRINTTAB(1,5)"Another game? y/n" 180UNTIL FNgetkey("yn")="n" 190MODE7:PRINT"Bye then!"'':*FX 4 0 200END 210: 220DEFPROCinitialiseboard 230LOCAL col% 240FOR col%=0 TO 8 250height%(col%)=0 260NEXT 270$board%=board$ 280ENDPROC 290: 300DEFPROCinitialisevars 310LOCAL char%,ch% 320 board%=&5700:code%=&57AD 330board$=STRING$(9,"*")+STRING$(6,"*"+STRING$(7,".")+"*")+STRING$(9,"*") 340?&70=0:?&71=&57 350human%=ASC("H"):computer%=ASC("C") 360DIM height%(8) 370level%=1:c3%=16:c2%=7:h3%=10:h2%=4 380computerwins%=0:humanwins%=0 390PROCaskifsound 400VDU 23,224,3,3,31,31,63,63,124,124 410VDU 23,225,192,192,248,248,252,252,62,62 420VDU 23,226,113,113,119,119,239,239,239,239 430VDU 23,227,142,142,238,238,247,247,247,247 440VDU 23,228,239,239,239,239,119,119,113,113 450VDU 23,229,247,247,247,247,238,238,142,142 460VDU 23,230,124,124,63,63,31,31,3,3 470VDU 23,231,62,62,252,252,248,248,192,192 480counter$="" 490RESTORE 530 500FOR char%=1 TO 22 510READ ch%:counter$=counter$+CHR$ch% 520NEXT 530DATA 32,32 540DATA 8,8,10,224,225,8,8,10,226,227 550DATA 8,8,10,228,229,8,8,10,230,231 560ENDPROC 570: 580DEFPROCaskifsound 590COLOUR131:COLOUR0:CLS 600VDU23;8202;0;0;0;19,0,4;0; 610PRINTTAB(4,6)"Connect Four" 620PRINTTAB(4,7)"------------" 630PRINTTAB(1,16)"Do you want sound?";TAB(3,18)"(Press Y or N)" 640sound%=(FNgetkey("yn")="y") 650ENDPROC 660: 670DEFPROCcount(x%,y%,player%) 680?&72=9*y%+x%:?&74=player% 690CALL code% 700twos%=?&75:threes%=?&76:fours%=?&77 710ENDPROC 720: 730DEFPROCmakemove(column%,player%) 740turnstaken%=turnstaken%+1 750height%(column%)=height%(column%)+1 760?(board%+column%+9*height%(column%))=player% 770PROCdrawnewcounter(column%,height%(column%),player%) 780ENDPROC 790: 800DEFFNmovevalue(column%) 810LOCAL twos%,threes%,fours%,value% 820IF height%(column%)=6 THEN =-1000 830PROCcount(column%,height%(column%)+1,computer%) 840IF fours%>=1 THEN computerwon%=TRUE:=1000 850value%=c3%*threes%+c2%*twos% 860PROCcount(column%,height%(column%)+1,human%) 870IF fours%>=1 THEN =900 880value%=value%+h3%*threes%+h2%*twos% 890IF height%(column%)=5 OR level%=1 THEN =value% 900PROCcount(column%,height%(column%)+2,human%) 910IF fours%>=1 THEN =-900 920PROCcount(column%,height%(column%)+2,computer%) 930IF fours%>=1 THEN =-800 940=value% 950: 960DEFFNbestmove 970LOCAL moveval%,bestmoveval%,col%,bestmove% 980bestmove%=0:bestmoveval%=-1000 990FOR col%=1 TO 7 1000moveval%=FNmovevalue(col%) 1010IF moveval%>bestmoveval% THEN bestmoveval%=moveval%:bestmove%=col% 1020NEXT 1030=bestmove% 1040: 1050DEFPROCgame 1060LOCAL yn$,computerwon%,humanwon%,turnstaken% 1070computerwon%=FALSE:humanwon%=FALSE:turnstaken%=0 1080IF FNcomputerfirst THEN PROCmakemove(RND(5)+1,computer%) 1090REPEAT 1100PROChumanmove 1110IF NOT humanwon% AND turnstaken%<42 THEN PROCcomputermove 1120UNTIL computerwon% OR humanwon% OR turnstaken%=42 1130PRINTTAB(0,3)SPC(20);TAB(5,3); 1140IF computerwon% PROCfanfare:PRINT"I WON!!!":computerwins%=computerwins%+1 1150IF humanwon% PRINT"You won.":humanwins%=humanwins%+1 1160IF NOT(computerwon% OR humanwon%) PRINT"It's a draw." 1170ENDPROC 1180: 1190DEFPROCdrawboard 1200LOCAL x% 1210CLS 1220GCOL 0,0 1230FOR x%=1 TO 6 1240MOVE 192*x%-48,32:DRAW 192*x%-48,806:DRAW 192*x%-24,806:DRAW 192*x%-24,32 1250NEXT 1260MOVE 0,28:DRAW 1280,28 1270MOVE 0,12:DRAW 1280,12 1280COLOUR0 1290FOR x%=1 TO 7 1300PRINTTAB(3*x%-2,7);x%; 1310NEXT 1320COLOUR1 1330ENDPROC 1340: 1350DEFPROCdrawnewcounter(column%,height%,player%) 1360LOCAL x%,y%,colour% 1370IF player%=human% colour%=1 ELSE colour%=2 1380COLOUR colour% 1390x%=3*(column%-1) 1400FOR y%=2 TO 30-4*height% 1410IF y%=8 THEN COLOUR0:PRINTTAB(x%+1,7);column%;:COLOUR colour% 1420PRINTTAB(x%,y%);counter$; 1430IF sound% THEN SOUND&11,-4,120-4*y%,1 1440NEXT 1450COLOUR1 1460ENDPROC 1470: 1480DEFPROChumanmove 1490LOCAL humanmove%,twos%,threes%,fours% 1500PRINTTAB(2,5)"Your move 1-7? "; 1510REPEAT:humanmove%=FNnumkey("1234567"):UNTIL height%(humanmove%)<6 1520PROCclear 1530PROCmakemove(humanmove%,human%) 1540PROCcount(humanmove%,height%(humanmove%),human%) 1550IF fours%>=1 THEN humanwon%=TRUE 1560ENDPROC 1570: 1580DEFPROCcomputermove 1590LOCAL computermove% 1600computermove%=FNbestmove 1610PROCmakemove(computermove%,computer%) 1620IF NOT computerwon% PRINTTAB(2,3)"I go in column ";computermove% 1630ENDPROC 1640: 1650DEFPROCfanfare 1660IF NOT sound% THEN ENDPROC 1670LOCAL note%,pitch%,dur% 1680RESTORE 1720 1690FOR note%=1 TO 5 1700READ pitch%,dur%:SOUND1,-8,pitch%,dur% 1710NEXT 1720DATA 60,4,80,2,100,4,60,3,80,8 1730ENDPROC 1740: 1750DEFPROCprintscores 1760LOCAL score$ 1770score$="Level-"+STR$(level%)+" Me-"+STR$(computerwins%)+" You-"+STR$(humanwins%) 1780IF humanwins%<10 AND computerwins%<10 THEN score$=" "+score$ 1790PRINTTAB(0,1)SPC(20) 1800VDU5:GCOL0,1:MOVE 8,988:PRINTscore$ 1810GCOL0,0:MOVE 0,992:PRINTscore$ 1820VDU4:ENDPROC 1830: 1840DEFFNgetkey(allowed$) 1850LOCAL key$ 1860REPEAT:key$=CHR$(GET OR &20):UNTIL INSTR(allowed$,key$)>0 1870=key$ 1880: 1890DEFFNnumkey(allowed$) 1900LOCAL key$,key% 1910REPEAT 1920PRINT" ";CHR$(8); 1930REPEAT:key$=GET$:UNTIL INSTR(allowed$,key$)>0 1940PRINTkey$;CHR$(8); 1950key%=ASC(key$)-ASC("0") 1960REPEAT:key$=GET$:UNTILkey$=CHR$13 OR key$=CHR$127 1970UNTILkey$=CHR$13:=key% 1980: 1990DEFFNcomputerfirst 2000LOCAL key$ 2010REPEAT 2020PRINTTAB(3,1)"Press space to";TAB(2,3)"change the level" 2030PRINTTAB(1,5)"Move first? (y/n)" 2040key$=FNgetkey("yn ") 2050IF key$=" " PROCchangelevel 2060PROCclear:PRINTTAB(0,1)SPC(20) 2070UNTIL key$<>" " 2080PROCprintscores 2090=(key$="n") 2100: 2110DEFPROCchangelevel 2120PROCclear:PRINTTAB(0,1)SPC(20) 2130PRINTTAB(2,1)"Current level: ";level% 2140PRINTTAB(2,3)"1 easy to 3 hard" 2150PRINTTAB(2,5)"New level 1-3? "; 2160level%=FNnumkey("123") 2170IF level%=3 THEN c2%=4:h3%=15:h2%=3 ELSE c2%=7:h3%=10:h2%=4 2180ENDPROC 2190: 2200DEFPROCclear 2210PRINTTAB(0,3)SPC(20);TAB(0,5)SPC(20) 2220ENDPROC 2230: 2240DEFPROCsetupcode 2250LOCAL addr%,byte$ 2260RESTORE 2320 2270FOR addr%=&5750 TO &57C9 2280READ byte$:?addr%=EVAL("&"+byte$) 2290NEXT 2300ENDPROC 2310: 2320DATA A4,72,98,18,65,73,A8,E6 2330DATA 79,B1,70,C5,74,F0,9,C9 2340DATA 2E,D0,E,E6,7A,4C,52,57 2350DATA A5,7A,D0,E6,E6,78,4C,52 2360DATA 57,C6,79,60,85,73,A9,1 2370DATA 85,79,85,78,A9,0,85,7A 2380DATA 20,50,57,A9,0,85,7A,A5 2390DATA 73,49,FF,A8,C8,84,73,20 2400DATA 50,57,A5,79,C9,4,30,14 2410DATA A5,78,C9,4,30,2,E6,77 2420DATA C9,3,D0,2,E6,76,C9,2 2430DATA D0,2,E6,75,60,A9,0,85 2440DATA 75,85,76,85,77,A9,1,20 2450DATA 74,57,A9,9,20,74,57,A9 2460DATA 8,20,74,57,A9,A,20,74 2470DATA 57,60
� Connect Four � by Malcolm F Wilkins � (c) The Micro User (� not for Archimedes 2� < � � �t~@ F*TV 0 1 P*FX 4 1 Z� 5 d�=&5700 n�initialisevars x�setupcode �� ��initialiseboard ��drawboard � �game ��1,5)"Another game? y/n" �� �getkey("yn")="n" ��7:�"Bye then!"'':*FX 4 0 �� �: ���initialiseboard � � col% �� col%=0 � 8 �height%(col%)=0 � $board%=board$ � ": ,��initialisevars 6� char%,ch% @ board%=&5700:code%=&57AD J.board$=�9,"*")+�6,"*"+�7,".")+"*")+�9,"*") T?&70=0:?&71=&57 ^"human%=�("H"):computer%=�("C") h� height%(8) r&level%=1:c3%=16:c2%=7:h3%=10:h2%=4 | computerwins%=0:humanwins%=0 ��askifsound �$� 23,224,3,3,31,31,63,63,124,124 �*� 23,225,192,192,248,248,252,252,62,62 �,� 23,226,113,113,119,119,239,239,239,239 �,� 23,227,142,142,238,238,247,247,247,247 �,� 23,228,239,239,239,239,119,119,113,113 �,� 23,229,247,247,247,247,238,238,142,142 �$� 23,230,124,124,63,63,31,31,3,3 �*� 23,231,62,62,252,252,248,248,192,192 �counter$="" � � �TRB �� char%=1 � 22 � � ch%:counter$=counter$+�ch% � � 32,32 #� 8,8,10,224,225,8,8,10,226,227 &#� 8,8,10,228,229,8,8,10,230,231 0� :: D��askifsound N �131:�0:� X�23;8202;0;0;0;19,0,4;0; b�4,6)"Connect Four" l�4,7)"------------" v6�1,16)"Do you want sound?";�3,18)"(Press Y or N)" �sound%=(�getkey("yn")="y") �� �: ���count(x%,y%,player%) �?&72=9*y%+x%:?&74=player% �� code% �'twos%=?&75:threes%=?&76:fours%=?&77 �� �: ���makemove(column%,player%) �turnstaken%=turnstaken%+1 �'height%(column%)=height%(column%)+1 �0?(board%+column%+9*height%(column%))=player% 5�drawnewcounter(column%,height%(column%),player%) � : ݤmovevalue(column%) *!� twos%,threes%,fours%,value% 4!� height%(column%)=6 � =-1000 >0�count(column%,height%(column%)+1,computer%) H&� fours%>=1 � computerwon%=�:=1000 R value%=c3%*threes%+c2%*twos% \-�count(column%,height%(column%)+1,human%) f� fours%>=1 � =900 p'value%=value%+h3%*threes%+h2%*twos% z-� height%(column%)=5 � level%=1 � =value% �-�count(column%,height%(column%)+2,human%) �� fours%>=1 � =-900 �0�count(column%,height%(column%)+2,computer%) �� fours%>=1 � =-800 �=value% �: �ݤbestmove �*� moveval%,bestmoveval%,col%,bestmove% �"bestmove%=0:bestmoveval%=-1000 �� col%=1 � 7 �moveval%=�movevalue(col%) �B� moveval%>bestmoveval% � bestmoveval%=moveval%:bestmove%=col% �� =bestmove% : ��game $,� yn$,computerwon%,humanwon%,turnstaken% .,computerwon%=�:humanwon%=�:turnstaken%=0 82� �computerfirst � �makemove(�(5)+1,computer%) B� L�humanmove V2� � humanwon% � turnstaken%<42 � �computermove `/� computerwon% � humanwon% � turnstaken%=42 j�0,3)�(20);�5,3); tE� computerwon% �fanfare:�"I WON!!!":computerwins%=computerwins%+1 ~3� humanwon% �"You won.":humanwins%=humanwins%+1 �1� �(computerwon% � humanwon%) �"It's a draw." �� �: ���drawboard �� x% �� � � 0,0 �� x%=1 � 6 �A� 192*x%-48,32:� 192*x%-48,806:� 192*x%-24,806:� 192*x%-24,32 �� �� 0,28:� 1280,28 �� 0,12:� 1280,12 �0 � x%=1 � 7 �3*x%-2,7);x%; � (�1 2� <: F-��drawnewcounter(column%,height%,player%) P� x%,y%,colour% Z*� player%=human% colour%=1 � colour%=2 d � colour% nx%=3*(column%-1) x� y%=2 � 30-4*height% �,� y%=8 � �0:�x%+1,7);column%;:� colour% ��x%,y%);counter$; �!� sound% � �&11,-4,120-4*y%,1 �� ��1 �� �: ���humanmove �%� humanmove%,twos%,threes%,fours% ��2,5)"Your move 1-7? "; �;�:humanmove%=�numkey("1234567"):� height%(humanmove%)<6 � �clear � �makemove(humanmove%,human%) 1�count(humanmove%,height%(humanmove%),human%) � fours%>=1 � humanwon%=� � ": ,��computermove 6� computermove% @computermove%=�bestmove J&�makemove(computermove%,computer%) T:� � computerwon% �2,3)"I go in column ";computermove% ^� h: r ��fanfare |� � sound% � � �� note%,pitch%,dur% � � �txF �� note%=1 � 5 �#� pitch%,dur%:�1,-8,pitch%,dur% �� �� 60,4,80,2,100,4,60,3,80,8 �� �: ���printscores �� score$ �Kscore$="Level-"+�(level%)+" Me-"+�(computerwins%)+" You-"+�(humanwins%) �:� humanwins%<10 � computerwins%<10 � score$=" "+score$ ��0,1)�(20) �5:�0,1:� 8,988:�score$ �0,0:� 0,992:�score$ �4:� &: 0ݤgetkey(allowed$) : � key$ D)�:key$=�(� � &20):� �allowed$,key$)>0 N =key$ X: bݤnumkey(allowed$) l� key$,key% v� ��" ";�(8); � �:key$=�:� �allowed$,key$)>0 ��key$;�(8); �key%=�(key$)-�("0") �"�:key$=�:�key$=�13 � key$=�127 ��key$=�13:=key% �: �ݤcomputerfirst � � key$ �� �2�3,1)"Press space to";�2,3)"change the level" ��1,5)"Move first? (y/n)" �key$=�getkey("yn ") � key$=" " �changelevel �clear:�0,1)�(20) � key$<>" " �printscores *=(key$="n") 4: >��changelevel H�clear:�0,1)�(20) R"�2,1)"Current level: ";level% \�2,3)"1 easy to 3 hard" f�2,5)"New level 1-3? "; plevel%=�numkey("123") z8� level%=3 � c2%=4:h3%=15:h2%=3 � c2%=7:h3%=10:h2%=4 �� �: ���clear ��0,3)�(20);�0,5)�(20) �� �: ���setupcode �� addr%,byte$ � � �TPI �� addr%=&5750 � &57C9 �� byte$:?addr%=�("&"+byte$) �� �� : � A4,72,98,18,65,73,A8,E6 � 79,B1,70,C5,74,F0,9,C9 $� 2E,D0,E,E6,7A,4C,52,57 .� A5,7A,D0,E6,E6,78,4C,52 8� 57,C6,79,60,85,73,A9,1 B� 85,79,85,78,A9,0,85,7A L� 20,50,57,A9,0,85,7A,A5 V� 73,49,FF,A8,C8,84,73,20 `� 50,57,A5,79,C9,4,30,14 j� A5,78,C9,4,30,2,E6,77 t� C9,3,D0,2,E6,76,C9,2 ~� D0,2,E6,75,60,A9,0,85 �� 75,85,76,85,77,A9,1,20 �� 74,57,A9,9,20,74,57,A9 �� 8,20,74,57,A9,A,20,74 �� 57,60 �
00000000 0d 00 0a 12 f4 20 43 6f 6e 6e 65 63 74 20 46 6f |..... Connect Fo| 00000010 75 72 0d 00 14 1a f4 20 62 79 20 4d 61 6c 63 6f |ur..... by Malco| 00000020 6c 6d 20 46 20 57 69 6c 6b 69 6e 73 0d 00 1e 18 |lm F Wilkins....| 00000030 f4 20 28 63 29 20 54 68 65 20 4d 69 63 72 6f 20 |. (c) The Micro | 00000040 55 73 65 72 0d 00 28 18 f4 20 6e 6f 74 20 66 6f |User..(.. not fo| 00000050 72 20 41 72 63 68 69 6d 65 64 65 73 0d 00 32 05 |r Archimedes..2.| 00000060 f4 0d 00 3c 0d ee 85 20 e5 20 8d 74 7e 40 0d 00 |...<... . .t~@..| 00000070 46 0b 2a 54 56 20 30 20 31 0d 00 50 0b 2a 46 58 |F.*TV 0 1..P.*FX| 00000080 20 34 20 31 0d 00 5a 07 eb 20 35 0d 00 64 0b d3 | 4 1..Z.. 5..d..| 00000090 3d 26 35 37 30 30 0d 00 6e 13 f2 69 6e 69 74 69 |=&5700..n..initi| 000000a0 61 6c 69 73 65 76 61 72 73 0d 00 78 0e f2 73 65 |alisevars..x..se| 000000b0 74 75 70 63 6f 64 65 0d 00 82 05 f5 0d 00 8c 14 |tupcode.........| 000000c0 f2 69 6e 69 74 69 61 6c 69 73 65 62 6f 61 72 64 |.initialiseboard| 000000d0 0d 00 96 0e f2 64 72 61 77 62 6f 61 72 64 0d 00 |.....drawboard..| 000000e0 a0 09 f2 67 61 6d 65 0d 00 aa 1e f1 8a 31 2c 35 |...game......1,5| 000000f0 29 22 41 6e 6f 74 68 65 72 20 67 61 6d 65 3f 20 |)"Another game? | 00000100 20 79 2f 6e 22 0d 00 b4 17 fd 20 a4 67 65 74 6b | y/n"..... .getk| 00000110 65 79 28 22 79 6e 22 29 3d 22 6e 22 0d 00 be 1d |ey("yn")="n"....| 00000120 eb 37 3a f1 22 42 79 65 20 74 68 65 6e 21 22 27 |.7:."Bye then!"'| 00000130 27 3a 2a 46 58 20 34 20 30 0d 00 c8 05 e0 0d 00 |':*FX 4 0.......| 00000140 d2 05 3a 0d 00 dc 15 dd f2 69 6e 69 74 69 61 6c |..:......initial| 00000150 69 73 65 62 6f 61 72 64 0d 00 e6 0a ea 20 63 6f |iseboard..... co| 00000160 6c 25 0d 00 f0 10 e3 20 63 6f 6c 25 3d 30 20 b8 |l%..... col%=0 .| 00000170 20 38 0d 00 fa 13 68 65 69 67 68 74 25 28 63 6f | 8....height%(co| 00000180 6c 25 29 3d 30 0d 01 04 05 ed 0d 01 0e 12 24 62 |l%)=0.........$b| 00000190 6f 61 72 64 25 3d 62 6f 61 72 64 24 0d 01 18 05 |oard%=board$....| 000001a0 e1 0d 01 22 05 3a 0d 01 2c 14 dd f2 69 6e 69 74 |...".:..,...init| 000001b0 69 61 6c 69 73 65 76 61 72 73 0d 01 36 0f ea 20 |ialisevars..6.. | 000001c0 63 68 61 72 25 2c 63 68 25 0d 01 40 1d 20 62 6f |char%,ch%..@. bo| 000001d0 61 72 64 25 3d 26 35 37 30 30 3a 63 6f 64 65 25 |ard%=&5700:code%| 000001e0 3d 26 35 37 41 44 0d 01 4a 2e 62 6f 61 72 64 24 |=&57AD..J.board$| 000001f0 3d c4 39 2c 22 2a 22 29 2b c4 36 2c 22 2a 22 2b |=.9,"*")+.6,"*"+| 00000200 c4 37 2c 22 2e 22 29 2b 22 2a 22 29 2b c4 39 2c |.7,".")+"*")+.9,| 00000210 22 2a 22 29 0d 01 54 13 3f 26 37 30 3d 30 3a 3f |"*")..T.?&70=0:?| 00000220 26 37 31 3d 26 35 37 0d 01 5e 22 68 75 6d 61 6e |&71=&57..^"human| 00000230 25 3d 97 28 22 48 22 29 3a 63 6f 6d 70 75 74 65 |%=.("H"):compute| 00000240 72 25 3d 97 28 22 43 22 29 0d 01 68 10 de 20 68 |r%=.("C")..h.. h| 00000250 65 69 67 68 74 25 28 38 29 0d 01 72 26 6c 65 76 |eight%(8)..r&lev| 00000260 65 6c 25 3d 31 3a 63 33 25 3d 31 36 3a 63 32 25 |el%=1:c3%=16:c2%| 00000270 3d 37 3a 68 33 25 3d 31 30 3a 68 32 25 3d 34 0d |=7:h3%=10:h2%=4.| 00000280 01 7c 20 63 6f 6d 70 75 74 65 72 77 69 6e 73 25 |.| computerwins%| 00000290 3d 30 3a 68 75 6d 61 6e 77 69 6e 73 25 3d 30 0d |=0:humanwins%=0.| 000002a0 01 86 0f f2 61 73 6b 69 66 73 6f 75 6e 64 0d 01 |....askifsound..| 000002b0 90 24 ef 20 32 33 2c 32 32 34 2c 33 2c 33 2c 33 |.$. 23,224,3,3,3| 000002c0 31 2c 33 31 2c 36 33 2c 36 33 2c 31 32 34 2c 31 |1,31,63,63,124,1| 000002d0 32 34 0d 01 9a 2a ef 20 32 33 2c 32 32 35 2c 31 |24...*. 23,225,1| 000002e0 39 32 2c 31 39 32 2c 32 34 38 2c 32 34 38 2c 32 |92,192,248,248,2| 000002f0 35 32 2c 32 35 32 2c 36 32 2c 36 32 0d 01 a4 2c |52,252,62,62...,| 00000300 ef 20 32 33 2c 32 32 36 2c 31 31 33 2c 31 31 33 |. 23,226,113,113| 00000310 2c 31 31 39 2c 31 31 39 2c 32 33 39 2c 32 33 39 |,119,119,239,239| 00000320 2c 32 33 39 2c 32 33 39 0d 01 ae 2c ef 20 32 33 |,239,239...,. 23| 00000330 2c 32 32 37 2c 31 34 32 2c 31 34 32 2c 32 33 38 |,227,142,142,238| 00000340 2c 32 33 38 2c 32 34 37 2c 32 34 37 2c 32 34 37 |,238,247,247,247| 00000350 2c 32 34 37 0d 01 b8 2c ef 20 32 33 2c 32 32 38 |,247...,. 23,228| 00000360 2c 32 33 39 2c 32 33 39 2c 32 33 39 2c 32 33 39 |,239,239,239,239| 00000370 2c 31 31 39 2c 31 31 39 2c 31 31 33 2c 31 31 33 |,119,119,113,113| 00000380 0d 01 c2 2c ef 20 32 33 2c 32 32 39 2c 32 34 37 |...,. 23,229,247| 00000390 2c 32 34 37 2c 32 34 37 2c 32 34 37 2c 32 33 38 |,247,247,247,238| 000003a0 2c 32 33 38 2c 31 34 32 2c 31 34 32 0d 01 cc 24 |,238,142,142...$| 000003b0 ef 20 32 33 2c 32 33 30 2c 31 32 34 2c 31 32 34 |. 23,230,124,124| 000003c0 2c 36 33 2c 36 33 2c 33 31 2c 33 31 2c 33 2c 33 |,63,63,31,31,3,3| 000003d0 0d 01 d6 2a ef 20 32 33 2c 32 33 31 2c 36 32 2c |...*. 23,231,62,| 000003e0 36 32 2c 32 35 32 2c 32 35 32 2c 32 34 38 2c 32 |62,252,252,248,2| 000003f0 34 38 2c 31 39 32 2c 31 39 32 0d 01 e0 0f 63 6f |48,192,192....co| 00000400 75 6e 74 65 72 24 3d 22 22 0d 01 ea 0a f7 20 8d |unter$=""..... .| 00000410 54 52 42 0d 01 f4 12 e3 20 63 68 61 72 25 3d 31 |TRB..... char%=1| 00000420 20 b8 20 32 32 0d 01 fe 20 f3 20 63 68 25 3a 63 | . 22... . ch%:c| 00000430 6f 75 6e 74 65 72 24 3d 63 6f 75 6e 74 65 72 24 |ounter$=counter$| 00000440 2b bd 63 68 25 0d 02 08 05 ed 0d 02 12 0b dc 20 |+.ch%.......... | 00000450 33 32 2c 33 32 0d 02 1c 23 dc 20 38 2c 38 2c 31 |32,32...#. 8,8,1| 00000460 30 2c 32 32 34 2c 32 32 35 2c 38 2c 38 2c 31 30 |0,224,225,8,8,10| 00000470 2c 32 32 36 2c 32 32 37 0d 02 26 23 dc 20 38 2c |,226,227..&#. 8,| 00000480 38 2c 31 30 2c 32 32 38 2c 32 32 39 2c 38 2c 38 |8,10,228,229,8,8| 00000490 2c 31 30 2c 32 33 30 2c 32 33 31 0d 02 30 05 e1 |,10,230,231..0..| 000004a0 0d 02 3a 05 3a 0d 02 44 10 dd f2 61 73 6b 69 66 |..:.:..D...askif| 000004b0 73 6f 75 6e 64 0d 02 4e 0d fb 31 33 31 3a fb 30 |sound..N..131:.0| 000004c0 3a db 0d 02 58 1c ef 32 33 3b 38 32 30 32 3b 30 |:...X..23;8202;0| 000004d0 3b 30 3b 30 3b 31 39 2c 30 2c 34 3b 30 3b 0d 02 |;0;0;19,0,4;0;..| 000004e0 62 18 f1 8a 34 2c 36 29 22 43 6f 6e 6e 65 63 74 |b...4,6)"Connect| 000004f0 20 46 6f 75 72 22 0d 02 6c 18 f1 8a 34 2c 37 29 | Four"..l...4,7)| 00000500 22 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 0d 02 |"------------"..| 00000510 76 36 f1 8a 31 2c 31 36 29 22 44 6f 20 79 6f 75 |v6..1,16)"Do you| 00000520 20 77 61 6e 74 20 73 6f 75 6e 64 3f 22 3b 8a 33 | want sound?";.3| 00000530 2c 31 38 29 22 28 50 72 65 73 73 20 59 20 6f 72 |,18)"(Press Y or| 00000540 20 4e 29 22 0d 02 80 1e 73 6f 75 6e 64 25 3d 28 | N)"....sound%=(| 00000550 a4 67 65 74 6b 65 79 28 22 79 6e 22 29 3d 22 79 |.getkey("yn")="y| 00000560 22 29 0d 02 8a 05 e1 0d 02 94 05 3a 0d 02 9e 1a |").........:....| 00000570 dd f2 63 6f 75 6e 74 28 78 25 2c 79 25 2c 70 6c |..count(x%,y%,pl| 00000580 61 79 65 72 25 29 0d 02 a8 1d 3f 26 37 32 3d 39 |ayer%)....?&72=9| 00000590 2a 79 25 2b 78 25 3a 3f 26 37 34 3d 70 6c 61 79 |*y%+x%:?&74=play| 000005a0 65 72 25 0d 02 b2 0b d6 20 63 6f 64 65 25 0d 02 |er%..... code%..| 000005b0 bc 27 74 77 6f 73 25 3d 3f 26 37 35 3a 74 68 72 |.'twos%=?&75:thr| 000005c0 65 65 73 25 3d 3f 26 37 36 3a 66 6f 75 72 73 25 |ees%=?&76:fours%| 000005d0 3d 3f 26 37 37 0d 02 c6 05 e1 0d 02 d0 05 3a 0d |=?&77.........:.| 000005e0 02 da 1f dd f2 6d 61 6b 65 6d 6f 76 65 28 63 6f |.....makemove(co| 000005f0 6c 75 6d 6e 25 2c 70 6c 61 79 65 72 25 29 0d 02 |lumn%,player%)..| 00000600 e4 1d 74 75 72 6e 73 74 61 6b 65 6e 25 3d 74 75 |..turnstaken%=tu| 00000610 72 6e 73 74 61 6b 65 6e 25 2b 31 0d 02 ee 27 68 |rnstaken%+1...'h| 00000620 65 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 3d |eight%(column%)=| 00000630 68 65 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 |height%(column%)| 00000640 2b 31 0d 02 f8 30 3f 28 62 6f 61 72 64 25 2b 63 |+1...0?(board%+c| 00000650 6f 6c 75 6d 6e 25 2b 39 2a 68 65 69 67 68 74 25 |olumn%+9*height%| 00000660 28 63 6f 6c 75 6d 6e 25 29 29 3d 70 6c 61 79 65 |(column%))=playe| 00000670 72 25 0d 03 02 35 f2 64 72 61 77 6e 65 77 63 6f |r%...5.drawnewco| 00000680 75 6e 74 65 72 28 63 6f 6c 75 6d 6e 25 2c 68 65 |unter(column%,he| 00000690 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 2c 70 |ight%(column%),p| 000006a0 6c 61 79 65 72 25 29 0d 03 0c 05 e1 0d 03 16 05 |layer%).........| 000006b0 3a 0d 03 20 18 dd a4 6d 6f 76 65 76 61 6c 75 65 |:.. ...movevalue| 000006c0 28 63 6f 6c 75 6d 6e 25 29 0d 03 2a 21 ea 20 74 |(column%)..*!. t| 000006d0 77 6f 73 25 2c 74 68 72 65 65 73 25 2c 66 6f 75 |wos%,threes%,fou| 000006e0 72 73 25 2c 76 61 6c 75 65 25 0d 03 34 21 e7 20 |rs%,value%..4!. | 000006f0 68 65 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 |height%(column%)| 00000700 3d 36 20 8c 20 3d 2d 31 30 30 30 0d 03 3e 30 f2 |=6 . =-1000..>0.| 00000710 63 6f 75 6e 74 28 63 6f 6c 75 6d 6e 25 2c 68 65 |count(column%,he| 00000720 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 2b 31 |ight%(column%)+1| 00000730 2c 63 6f 6d 70 75 74 65 72 25 29 0d 03 48 26 e7 |,computer%)..H&.| 00000740 20 66 6f 75 72 73 25 3e 3d 31 20 8c 20 63 6f 6d | fours%>=1 . com| 00000750 70 75 74 65 72 77 6f 6e 25 3d b9 3a 3d 31 30 30 |puterwon%=.:=100| 00000760 30 0d 03 52 20 76 61 6c 75 65 25 3d 63 33 25 2a |0..R value%=c3%*| 00000770 74 68 72 65 65 73 25 2b 63 32 25 2a 74 77 6f 73 |threes%+c2%*twos| 00000780 25 0d 03 5c 2d f2 63 6f 75 6e 74 28 63 6f 6c 75 |%..\-.count(colu| 00000790 6d 6e 25 2c 68 65 69 67 68 74 25 28 63 6f 6c 75 |mn%,height%(colu| 000007a0 6d 6e 25 29 2b 31 2c 68 75 6d 61 6e 25 29 0d 03 |mn%)+1,human%)..| 000007b0 66 16 e7 20 66 6f 75 72 73 25 3e 3d 31 20 8c 20 |f.. fours%>=1 . | 000007c0 3d 39 30 30 0d 03 70 27 76 61 6c 75 65 25 3d 76 |=900..p'value%=v| 000007d0 61 6c 75 65 25 2b 68 33 25 2a 74 68 72 65 65 73 |alue%+h3%*threes| 000007e0 25 2b 68 32 25 2a 74 77 6f 73 25 0d 03 7a 2d e7 |%+h2%*twos%..z-.| 000007f0 20 68 65 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 | height%(column%| 00000800 29 3d 35 20 84 20 6c 65 76 65 6c 25 3d 31 20 8c |)=5 . level%=1 .| 00000810 20 3d 76 61 6c 75 65 25 0d 03 84 2d f2 63 6f 75 | =value%...-.cou| 00000820 6e 74 28 63 6f 6c 75 6d 6e 25 2c 68 65 69 67 68 |nt(column%,heigh| 00000830 74 25 28 63 6f 6c 75 6d 6e 25 29 2b 32 2c 68 75 |t%(column%)+2,hu| 00000840 6d 61 6e 25 29 0d 03 8e 17 e7 20 66 6f 75 72 73 |man%)..... fours| 00000850 25 3e 3d 31 20 8c 20 3d 2d 39 30 30 0d 03 98 30 |%>=1 . =-900...0| 00000860 f2 63 6f 75 6e 74 28 63 6f 6c 75 6d 6e 25 2c 68 |.count(column%,h| 00000870 65 69 67 68 74 25 28 63 6f 6c 75 6d 6e 25 29 2b |eight%(column%)+| 00000880 32 2c 63 6f 6d 70 75 74 65 72 25 29 0d 03 a2 17 |2,computer%)....| 00000890 e7 20 66 6f 75 72 73 25 3e 3d 31 20 8c 20 3d 2d |. fours%>=1 . =-| 000008a0 38 30 30 0d 03 ac 0b 3d 76 61 6c 75 65 25 0d 03 |800....=value%..| 000008b0 b6 05 3a 0d 03 c0 0e dd a4 62 65 73 74 6d 6f 76 |..:......bestmov| 000008c0 65 0d 03 ca 2a ea 20 6d 6f 76 65 76 61 6c 25 2c |e...*. moveval%,| 000008d0 62 65 73 74 6d 6f 76 65 76 61 6c 25 2c 63 6f 6c |bestmoveval%,col| 000008e0 25 2c 62 65 73 74 6d 6f 76 65 25 0d 03 d4 22 62 |%,bestmove%..."b| 000008f0 65 73 74 6d 6f 76 65 25 3d 30 3a 62 65 73 74 6d |estmove%=0:bestm| 00000900 6f 76 65 76 61 6c 25 3d 2d 31 30 30 30 0d 03 de |oveval%=-1000...| 00000910 10 e3 20 63 6f 6c 25 3d 31 20 b8 20 37 0d 03 e8 |.. col%=1 . 7...| 00000920 1d 6d 6f 76 65 76 61 6c 25 3d a4 6d 6f 76 65 76 |.moveval%=.movev| 00000930 61 6c 75 65 28 63 6f 6c 25 29 0d 03 f2 42 e7 20 |alue(col%)...B. | 00000940 6d 6f 76 65 76 61 6c 25 3e 62 65 73 74 6d 6f 76 |moveval%>bestmov| 00000950 65 76 61 6c 25 20 8c 20 62 65 73 74 6d 6f 76 65 |eval% . bestmove| 00000960 76 61 6c 25 3d 6d 6f 76 65 76 61 6c 25 3a 62 65 |val%=moveval%:be| 00000970 73 74 6d 6f 76 65 25 3d 63 6f 6c 25 0d 03 fc 05 |stmove%=col%....| 00000980 ed 0d 04 06 0e 3d 62 65 73 74 6d 6f 76 65 25 0d |.....=bestmove%.| 00000990 04 10 05 3a 0d 04 1a 0a dd f2 67 61 6d 65 0d 04 |...:......game..| 000009a0 24 2c ea 20 79 6e 24 2c 63 6f 6d 70 75 74 65 72 |$,. yn$,computer| 000009b0 77 6f 6e 25 2c 68 75 6d 61 6e 77 6f 6e 25 2c 74 |won%,humanwon%,t| 000009c0 75 72 6e 73 74 61 6b 65 6e 25 0d 04 2e 2c 63 6f |urnstaken%...,co| 000009d0 6d 70 75 74 65 72 77 6f 6e 25 3d a3 3a 68 75 6d |mputerwon%=.:hum| 000009e0 61 6e 77 6f 6e 25 3d a3 3a 74 75 72 6e 73 74 61 |anwon%=.:turnsta| 000009f0 6b 65 6e 25 3d 30 0d 04 38 32 e7 20 a4 63 6f 6d |ken%=0..82. .com| 00000a00 70 75 74 65 72 66 69 72 73 74 20 8c 20 f2 6d 61 |puterfirst . .ma| 00000a10 6b 65 6d 6f 76 65 28 b3 28 35 29 2b 31 2c 63 6f |kemove(.(5)+1,co| 00000a20 6d 70 75 74 65 72 25 29 0d 04 42 05 f5 0d 04 4c |mputer%)..B....L| 00000a30 0e f2 68 75 6d 61 6e 6d 6f 76 65 0d 04 56 32 e7 |..humanmove..V2.| 00000a40 20 ac 20 68 75 6d 61 6e 77 6f 6e 25 20 80 20 74 | . humanwon% . t| 00000a50 75 72 6e 73 74 61 6b 65 6e 25 3c 34 32 20 8c 20 |urnstaken%<42 . | 00000a60 f2 63 6f 6d 70 75 74 65 72 6d 6f 76 65 0d 04 60 |.computermove..`| 00000a70 2f fd 20 63 6f 6d 70 75 74 65 72 77 6f 6e 25 20 |/. computerwon% | 00000a80 84 20 68 75 6d 61 6e 77 6f 6e 25 20 84 20 74 75 |. humanwon% . tu| 00000a90 72 6e 73 74 61 6b 65 6e 25 3d 34 32 0d 04 6a 16 |rnstaken%=42..j.| 00000aa0 f1 8a 30 2c 33 29 89 28 32 30 29 3b 8a 35 2c 33 |..0,3).(20);.5,3| 00000ab0 29 3b 0d 04 74 45 e7 20 63 6f 6d 70 75 74 65 72 |);..tE. computer| 00000ac0 77 6f 6e 25 20 f2 66 61 6e 66 61 72 65 3a f1 22 |won% .fanfare:."| 00000ad0 49 20 57 4f 4e 21 21 21 22 3a 63 6f 6d 70 75 74 |I WON!!!":comput| 00000ae0 65 72 77 69 6e 73 25 3d 63 6f 6d 70 75 74 65 72 |erwins%=computer| 00000af0 77 69 6e 73 25 2b 31 0d 04 7e 33 e7 20 68 75 6d |wins%+1..~3. hum| 00000b00 61 6e 77 6f 6e 25 20 f1 22 59 6f 75 20 77 6f 6e |anwon% ."You won| 00000b10 2e 22 3a 68 75 6d 61 6e 77 69 6e 73 25 3d 68 75 |.":humanwins%=hu| 00000b20 6d 61 6e 77 69 6e 73 25 2b 31 0d 04 88 31 e7 20 |manwins%+1...1. | 00000b30 ac 28 63 6f 6d 70 75 74 65 72 77 6f 6e 25 20 84 |.(computerwon% .| 00000b40 20 68 75 6d 61 6e 77 6f 6e 25 29 20 f1 22 49 74 | humanwon%) ."It| 00000b50 27 73 20 61 20 64 72 61 77 2e 22 0d 04 92 05 e1 |'s a draw.".....| 00000b60 0d 04 9c 05 3a 0d 04 a6 0f dd f2 64 72 61 77 62 |....:......drawb| 00000b70 6f 61 72 64 0d 04 b0 08 ea 20 78 25 0d 04 ba 05 |oard..... x%....| 00000b80 db 0d 04 c4 09 e6 20 30 2c 30 0d 04 ce 0e e3 20 |...... 0,0..... | 00000b90 78 25 3d 31 20 b8 20 36 0d 04 d8 41 ec 20 31 39 |x%=1 . 6...A. 19| 00000ba0 32 2a 78 25 2d 34 38 2c 33 32 3a df 20 31 39 32 |2*x%-48,32:. 192| 00000bb0 2a 78 25 2d 34 38 2c 38 30 36 3a df 20 31 39 32 |*x%-48,806:. 192| 00000bc0 2a 78 25 2d 32 34 2c 38 30 36 3a df 20 31 39 32 |*x%-24,806:. 192| 00000bd0 2a 78 25 2d 32 34 2c 33 32 0d 04 e2 05 ed 0d 04 |*x%-24,32.......| 00000be0 ec 14 ec 20 30 2c 32 38 3a df 20 31 32 38 30 2c |... 0,28:. 1280,| 00000bf0 32 38 0d 04 f6 14 ec 20 30 2c 31 32 3a df 20 31 |28..... 0,12:. 1| 00000c00 32 38 30 2c 31 32 0d 05 00 06 fb 30 0d 05 0a 0e |280,12.....0....| 00000c10 e3 20 78 25 3d 31 20 b8 20 37 0d 05 14 13 f1 8a |. x%=1 . 7......| 00000c20 33 2a 78 25 2d 32 2c 37 29 3b 78 25 3b 0d 05 1e |3*x%-2,7);x%;...| 00000c30 05 ed 0d 05 28 06 fb 31 0d 05 32 05 e1 0d 05 3c |....(..1..2....<| 00000c40 05 3a 0d 05 46 2d dd f2 64 72 61 77 6e 65 77 63 |.:..F-..drawnewc| 00000c50 6f 75 6e 74 65 72 28 63 6f 6c 75 6d 6e 25 2c 68 |ounter(column%,h| 00000c60 65 69 67 68 74 25 2c 70 6c 61 79 65 72 25 29 0d |eight%,player%).| 00000c70 05 50 13 ea 20 78 25 2c 79 25 2c 63 6f 6c 6f 75 |.P.. x%,y%,colou| 00000c80 72 25 0d 05 5a 2a e7 20 70 6c 61 79 65 72 25 3d |r%..Z*. player%=| 00000c90 68 75 6d 61 6e 25 20 63 6f 6c 6f 75 72 25 3d 31 |human% colour%=1| 00000ca0 20 8b 20 63 6f 6c 6f 75 72 25 3d 32 0d 05 64 0d | . colour%=2..d.| 00000cb0 fb 20 63 6f 6c 6f 75 72 25 0d 05 6e 14 78 25 3d |. colour%..n.x%=| 00000cc0 33 2a 28 63 6f 6c 75 6d 6e 25 2d 31 29 0d 05 78 |3*(column%-1)..x| 00000cd0 19 e3 20 79 25 3d 32 20 b8 20 33 30 2d 34 2a 68 |.. y%=2 . 30-4*h| 00000ce0 65 69 67 68 74 25 0d 05 82 2c e7 20 79 25 3d 38 |eight%...,. y%=8| 00000cf0 20 8c 20 fb 30 3a f1 8a 78 25 2b 31 2c 37 29 3b | . .0:..x%+1,7);| 00000d00 63 6f 6c 75 6d 6e 25 3b 3a fb 20 63 6f 6c 6f 75 |column%;:. colou| 00000d10 72 25 0d 05 8c 16 f1 8a 78 25 2c 79 25 29 3b 63 |r%......x%,y%);c| 00000d20 6f 75 6e 74 65 72 24 3b 0d 05 96 21 e7 20 73 6f |ounter$;...!. so| 00000d30 75 6e 64 25 20 8c 20 d4 26 31 31 2c 2d 34 2c 31 |und% . .&11,-4,1| 00000d40 32 30 2d 34 2a 79 25 2c 31 0d 05 a0 05 ed 0d 05 |20-4*y%,1.......| 00000d50 aa 06 fb 31 0d 05 b4 05 e1 0d 05 be 05 3a 0d 05 |...1.........:..| 00000d60 c8 0f dd f2 68 75 6d 61 6e 6d 6f 76 65 0d 05 d2 |....humanmove...| 00000d70 25 ea 20 68 75 6d 61 6e 6d 6f 76 65 25 2c 74 77 |%. humanmove%,tw| 00000d80 6f 73 25 2c 74 68 72 65 65 73 25 2c 66 6f 75 72 |os%,threes%,four| 00000d90 73 25 0d 05 dc 1c f1 8a 32 2c 35 29 22 59 6f 75 |s%......2,5)"You| 00000da0 72 20 6d 6f 76 65 20 31 2d 37 3f 20 22 3b 0d 05 |r move 1-7? ";..| 00000db0 e6 3b f5 3a 68 75 6d 61 6e 6d 6f 76 65 25 3d a4 |.;.:humanmove%=.| 00000dc0 6e 75 6d 6b 65 79 28 22 31 32 33 34 35 36 37 22 |numkey("1234567"| 00000dd0 29 3a fd 20 68 65 69 67 68 74 25 28 68 75 6d 61 |):. height%(huma| 00000de0 6e 6d 6f 76 65 25 29 3c 36 0d 05 f0 0a f2 63 6c |nmove%)<6.....cl| 00000df0 65 61 72 0d 05 fa 20 f2 6d 61 6b 65 6d 6f 76 65 |ear... .makemove| 00000e00 28 68 75 6d 61 6e 6d 6f 76 65 25 2c 68 75 6d 61 |(humanmove%,huma| 00000e10 6e 25 29 0d 06 04 31 f2 63 6f 75 6e 74 28 68 75 |n%)...1.count(hu| 00000e20 6d 61 6e 6d 6f 76 65 25 2c 68 65 69 67 68 74 25 |manmove%,height%| 00000e30 28 68 75 6d 61 6e 6d 6f 76 65 25 29 2c 68 75 6d |(humanmove%),hum| 00000e40 61 6e 25 29 0d 06 0e 1d e7 20 66 6f 75 72 73 25 |an%)..... fours%| 00000e50 3e 3d 31 20 8c 20 68 75 6d 61 6e 77 6f 6e 25 3d |>=1 . humanwon%=| 00000e60 b9 0d 06 18 05 e1 0d 06 22 05 3a 0d 06 2c 12 dd |........".:..,..| 00000e70 f2 63 6f 6d 70 75 74 65 72 6d 6f 76 65 0d 06 36 |.computermove..6| 00000e80 13 ea 20 63 6f 6d 70 75 74 65 72 6d 6f 76 65 25 |.. computermove%| 00000e90 0d 06 40 1b 63 6f 6d 70 75 74 65 72 6d 6f 76 65 |..@.computermove| 00000ea0 25 3d a4 62 65 73 74 6d 6f 76 65 0d 06 4a 26 f2 |%=.bestmove..J&.| 00000eb0 6d 61 6b 65 6d 6f 76 65 28 63 6f 6d 70 75 74 65 |makemove(compute| 00000ec0 72 6d 6f 76 65 25 2c 63 6f 6d 70 75 74 65 72 25 |rmove%,computer%| 00000ed0 29 0d 06 54 3a e7 20 ac 20 63 6f 6d 70 75 74 65 |)..T:. . compute| 00000ee0 72 77 6f 6e 25 20 f1 8a 32 2c 33 29 22 49 20 67 |rwon% ..2,3)"I g| 00000ef0 6f 20 69 6e 20 63 6f 6c 75 6d 6e 20 22 3b 63 6f |o in column ";co| 00000f00 6d 70 75 74 65 72 6d 6f 76 65 25 0d 06 5e 05 e1 |mputermove%..^..| 00000f10 0d 06 68 05 3a 0d 06 72 0d dd f2 66 61 6e 66 61 |..h.:..r...fanfa| 00000f20 72 65 0d 06 7c 12 e7 20 ac 20 73 6f 75 6e 64 25 |re..|.. . sound%| 00000f30 20 8c 20 e1 0d 06 86 17 ea 20 6e 6f 74 65 25 2c | . ...... note%,| 00000f40 70 69 74 63 68 25 2c 64 75 72 25 0d 06 90 0a f7 |pitch%,dur%.....| 00000f50 20 8d 74 78 46 0d 06 9a 11 e3 20 6e 6f 74 65 25 | .txF..... note%| 00000f60 3d 31 20 b8 20 35 0d 06 a4 23 f3 20 70 69 74 63 |=1 . 5...#. pitc| 00000f70 68 25 2c 64 75 72 25 3a d4 31 2c 2d 38 2c 70 69 |h%,dur%:.1,-8,pi| 00000f80 74 63 68 25 2c 64 75 72 25 0d 06 ae 05 ed 0d 06 |tch%,dur%.......| 00000f90 b8 1f dc 20 36 30 2c 34 2c 38 30 2c 32 2c 31 30 |... 60,4,80,2,10| 00000fa0 30 2c 34 2c 36 30 2c 33 2c 38 30 2c 38 0d 06 c2 |0,4,60,3,80,8...| 00000fb0 05 e1 0d 06 cc 05 3a 0d 06 d6 11 dd f2 70 72 69 |......:......pri| 00000fc0 6e 74 73 63 6f 72 65 73 0d 06 e0 0c ea 20 73 63 |ntscores..... sc| 00000fd0 6f 72 65 24 0d 06 ea 4b 73 63 6f 72 65 24 3d 22 |ore$...Kscore$="| 00000fe0 4c 65 76 65 6c 2d 22 2b c3 28 6c 65 76 65 6c 25 |Level-"+.(level%| 00000ff0 29 2b 22 20 4d 65 2d 22 2b c3 28 63 6f 6d 70 75 |)+" Me-"+.(compu| 00001000 74 65 72 77 69 6e 73 25 29 2b 22 20 59 6f 75 2d |terwins%)+" You-| 00001010 22 2b c3 28 68 75 6d 61 6e 77 69 6e 73 25 29 0d |"+.(humanwins%).| 00001020 06 f4 3a e7 20 68 75 6d 61 6e 77 69 6e 73 25 3c |..:. humanwins%<| 00001030 31 30 20 80 20 63 6f 6d 70 75 74 65 72 77 69 6e |10 . computerwin| 00001040 73 25 3c 31 30 20 8c 20 73 63 6f 72 65 24 3d 22 |s%<10 . score$="| 00001050 20 22 2b 73 63 6f 72 65 24 0d 06 fe 0f f1 8a 30 | "+score$......0| 00001060 2c 31 29 89 28 32 30 29 0d 07 08 1b ef 35 3a e6 |,1).(20).....5:.| 00001070 30 2c 31 3a ec 20 38 2c 39 38 38 3a f1 73 63 6f |0,1:. 8,988:.sco| 00001080 72 65 24 0d 07 12 18 e6 30 2c 30 3a ec 20 30 2c |re$.....0,0:. 0,| 00001090 39 39 32 3a f1 73 63 6f 72 65 24 0d 07 1c 08 ef |992:.score$.....| 000010a0 34 3a e1 0d 07 26 05 3a 0d 07 30 16 dd a4 67 65 |4:...&.:..0...ge| 000010b0 74 6b 65 79 28 61 6c 6c 6f 77 65 64 24 29 0d 07 |tkey(allowed$)..| 000010c0 3a 0a ea 20 6b 65 79 24 0d 07 44 29 f5 3a 6b 65 |:.. key$..D).:ke| 000010d0 79 24 3d bd 28 a5 20 84 20 26 32 30 29 3a fd 20 |y$=.(. . &20):. | 000010e0 a7 61 6c 6c 6f 77 65 64 24 2c 6b 65 79 24 29 3e |.allowed$,key$)>| 000010f0 30 0d 07 4e 09 3d 6b 65 79 24 0d 07 58 05 3a 0d |0..N.=key$..X.:.| 00001100 07 62 16 dd a4 6e 75 6d 6b 65 79 28 61 6c 6c 6f |.b...numkey(allo| 00001110 77 65 64 24 29 0d 07 6c 0f ea 20 6b 65 79 24 2c |wed$)..l.. key$,| 00001120 6b 65 79 25 0d 07 76 05 f5 0d 07 80 0e f1 22 20 |key%..v......." | 00001130 22 3b bd 28 38 29 3b 0d 07 8a 20 f5 3a 6b 65 79 |";.(8);... .:key| 00001140 24 3d be 3a fd 20 a7 61 6c 6c 6f 77 65 64 24 2c |$=.:. .allowed$,| 00001150 6b 65 79 24 29 3e 30 0d 07 94 0f f1 6b 65 79 24 |key$)>0.....key$| 00001160 3b bd 28 38 29 3b 0d 07 9e 17 6b 65 79 25 3d 97 |;.(8);....key%=.| 00001170 28 6b 65 79 24 29 2d 97 28 22 30 22 29 0d 07 a8 |(key$)-.("0")...| 00001180 22 f5 3a 6b 65 79 24 3d be 3a fd 6b 65 79 24 3d |".:key$=.:.key$=| 00001190 bd 31 33 20 84 20 6b 65 79 24 3d bd 31 32 37 0d |.13 . key$=.127.| 000011a0 07 b2 13 fd 6b 65 79 24 3d bd 31 33 3a 3d 6b 65 |....key$=.13:=ke| 000011b0 79 25 0d 07 bc 05 3a 0d 07 c6 13 dd a4 63 6f 6d |y%....:......com| 000011c0 70 75 74 65 72 66 69 72 73 74 0d 07 d0 0a ea 20 |puterfirst..... | 000011d0 6b 65 79 24 0d 07 da 05 f5 0d 07 e4 32 f1 8a 33 |key$........2..3| 000011e0 2c 31 29 22 50 72 65 73 73 20 73 70 61 63 65 20 |,1)"Press space | 000011f0 74 6f 22 3b 8a 32 2c 33 29 22 63 68 61 6e 67 65 |to";.2,3)"change| 00001200 20 74 68 65 20 6c 65 76 65 6c 22 0d 07 ee 1e f1 | the level".....| 00001210 8a 31 2c 35 29 22 4d 6f 76 65 20 66 69 72 73 74 |.1,5)"Move first| 00001220 3f 20 20 28 79 2f 6e 29 22 0d 07 f8 17 6b 65 79 |? (y/n)"....key| 00001230 24 3d a4 67 65 74 6b 65 79 28 22 79 6e 20 22 29 |$=.getkey("yn ")| 00001240 0d 08 02 1b e7 20 6b 65 79 24 3d 22 20 22 20 f2 |..... key$=" " .| 00001250 63 68 61 6e 67 65 6c 65 76 65 6c 0d 08 0c 16 f2 |changelevel.....| 00001260 63 6c 65 61 72 3a f1 8a 30 2c 31 29 89 28 32 30 |clear:..0,1).(20| 00001270 29 0d 08 16 0f fd 20 6b 65 79 24 3c 3e 22 20 22 |)..... key$<>" "| 00001280 0d 08 20 10 f2 70 72 69 6e 74 73 63 6f 72 65 73 |.. ..printscores| 00001290 0d 08 2a 0f 3d 28 6b 65 79 24 3d 22 6e 22 29 0d |..*.=(key$="n").| 000012a0 08 34 05 3a 0d 08 3e 11 dd f2 63 68 61 6e 67 65 |.4.:..>...change| 000012b0 6c 65 76 65 6c 0d 08 48 16 f2 63 6c 65 61 72 3a |level..H..clear:| 000012c0 f1 8a 30 2c 31 29 89 28 32 30 29 0d 08 52 22 f1 |..0,1).(20)..R".| 000012d0 8a 32 2c 31 29 22 43 75 72 72 65 6e 74 20 6c 65 |.2,1)"Current le| 000012e0 76 65 6c 3a 20 22 3b 6c 65 76 65 6c 25 0d 08 5c |vel: ";level%..\| 000012f0 1c f1 8a 32 2c 33 29 22 31 20 65 61 73 79 20 74 |...2,3)"1 easy t| 00001300 6f 20 33 20 68 61 72 64 22 0d 08 66 1c f1 8a 32 |o 3 hard"..f...2| 00001310 2c 35 29 22 4e 65 77 20 6c 65 76 65 6c 20 31 2d |,5)"New level 1-| 00001320 33 3f 20 22 3b 0d 08 70 19 6c 65 76 65 6c 25 3d |3? ";..p.level%=| 00001330 a4 6e 75 6d 6b 65 79 28 22 31 32 33 22 29 0d 08 |.numkey("123")..| 00001340 7a 38 e7 20 6c 65 76 65 6c 25 3d 33 20 8c 20 63 |z8. level%=3 . c| 00001350 32 25 3d 34 3a 68 33 25 3d 31 35 3a 68 32 25 3d |2%=4:h3%=15:h2%=| 00001360 33 20 8b 20 63 32 25 3d 37 3a 68 33 25 3d 31 30 |3 . c2%=7:h3%=10| 00001370 3a 68 32 25 3d 34 0d 08 84 05 e1 0d 08 8e 05 3a |:h2%=4.........:| 00001380 0d 08 98 0b dd f2 63 6c 65 61 72 0d 08 a2 1a f1 |......clear.....| 00001390 8a 30 2c 33 29 89 28 32 30 29 3b 8a 30 2c 35 29 |.0,3).(20);.0,5)| 000013a0 89 28 32 30 29 0d 08 ac 05 e1 0d 08 b6 05 3a 0d |.(20).........:.| 000013b0 08 c0 0f dd f2 73 65 74 75 70 63 6f 64 65 0d 08 |.....setupcode..| 000013c0 ca 11 ea 20 61 64 64 72 25 2c 62 79 74 65 24 0d |... addr%,byte$.| 000013d0 08 d4 0a f7 20 8d 54 50 49 0d 08 de 19 e3 20 61 |.... .TPI..... a| 000013e0 64 64 72 25 3d 26 35 37 35 30 20 b8 20 26 35 37 |ddr%=&5750 . &57| 000013f0 43 39 0d 08 e8 1f f3 20 62 79 74 65 24 3a 3f 61 |C9..... byte$:?a| 00001400 64 64 72 25 3d a0 28 22 26 22 2b 62 79 74 65 24 |ddr%=.("&"+byte$| 00001410 29 0d 08 f2 05 ed 0d 08 fc 05 e1 0d 09 06 05 3a |)..............:| 00001420 0d 09 10 1d dc 20 41 34 2c 37 32 2c 39 38 2c 31 |..... A4,72,98,1| 00001430 38 2c 36 35 2c 37 33 2c 41 38 2c 45 36 0d 09 1a |8,65,73,A8,E6...| 00001440 1c dc 20 37 39 2c 42 31 2c 37 30 2c 43 35 2c 37 |.. 79,B1,70,C5,7| 00001450 34 2c 46 30 2c 39 2c 43 39 0d 09 24 1c dc 20 32 |4,F0,9,C9..$.. 2| 00001460 45 2c 44 30 2c 45 2c 45 36 2c 37 41 2c 34 43 2c |E,D0,E,E6,7A,4C,| 00001470 35 32 2c 35 37 0d 09 2e 1d dc 20 41 35 2c 37 41 |52,57..... A5,7A| 00001480 2c 44 30 2c 45 36 2c 45 36 2c 37 38 2c 34 43 2c |,D0,E6,E6,78,4C,| 00001490 35 32 0d 09 38 1c dc 20 35 37 2c 43 36 2c 37 39 |52..8.. 57,C6,79| 000014a0 2c 36 30 2c 38 35 2c 37 33 2c 41 39 2c 31 0d 09 |,60,85,73,A9,1..| 000014b0 42 1c dc 20 38 35 2c 37 39 2c 38 35 2c 37 38 2c |B.. 85,79,85,78,| 000014c0 41 39 2c 30 2c 38 35 2c 37 41 0d 09 4c 1c dc 20 |A9,0,85,7A..L.. | 000014d0 32 30 2c 35 30 2c 35 37 2c 41 39 2c 30 2c 38 35 |20,50,57,A9,0,85| 000014e0 2c 37 41 2c 41 35 0d 09 56 1d dc 20 37 33 2c 34 |,7A,A5..V.. 73,4| 000014f0 39 2c 46 46 2c 41 38 2c 43 38 2c 38 34 2c 37 33 |9,FF,A8,C8,84,73| 00001500 2c 32 30 0d 09 60 1c dc 20 35 30 2c 35 37 2c 41 |,20..`.. 50,57,A| 00001510 35 2c 37 39 2c 43 39 2c 34 2c 33 30 2c 31 34 0d |5,79,C9,4,30,14.| 00001520 09 6a 1b dc 20 41 35 2c 37 38 2c 43 39 2c 34 2c |.j.. A5,78,C9,4,| 00001530 33 30 2c 32 2c 45 36 2c 37 37 0d 09 74 1a dc 20 |30,2,E6,77..t.. | 00001540 43 39 2c 33 2c 44 30 2c 32 2c 45 36 2c 37 36 2c |C9,3,D0,2,E6,76,| 00001550 43 39 2c 32 0d 09 7e 1b dc 20 44 30 2c 32 2c 45 |C9,2..~.. D0,2,E| 00001560 36 2c 37 35 2c 36 30 2c 41 39 2c 30 2c 38 35 0d |6,75,60,A9,0,85.| 00001570 09 88 1c dc 20 37 35 2c 38 35 2c 37 36 2c 38 35 |.... 75,85,76,85| 00001580 2c 37 37 2c 41 39 2c 31 2c 32 30 0d 09 92 1c dc |,77,A9,1,20.....| 00001590 20 37 34 2c 35 37 2c 41 39 2c 39 2c 32 30 2c 37 | 74,57,A9,9,20,7| 000015a0 34 2c 35 37 2c 41 39 0d 09 9c 1b dc 20 38 2c 32 |4,57,A9..... 8,2| 000015b0 30 2c 37 34 2c 35 37 2c 41 39 2c 41 2c 32 30 2c |0,74,57,A9,A,20,| 000015c0 37 34 0d 09 a6 0b dc 20 35 37 2c 36 30 0d ff |74..... 57,60..| 000015cf