home *** CD-ROM | disk | FTP | other *** search
- 10 poke51,0:poke52,96:poke55,0:poke56,96:gosub1200
- 20 input"what level-2,4,6,or 8";wg:wg=int(wg)
- 30 if wg<2thenwg=2
- 40 ifwg>8thenwg=8
- 50 ifwg=3orwg=5orwg=7thenwg=wg+1
- 60 print"level=";wg
- 70 ru= 24784:au=28927:lu=28926:iu=28908:rt=24576
- 80 gosub370
- 90 cc=1:bq=0
- 100 print"you first?"
- 110 geta$:ifa$=""then110
- 120 ifa$="y"thenaq=1:goto140
- 130 aq=-1:bq=1:gosub530:gosub720:goto150
- 140 gosub530
- 150 print" ";
- 160 ifbq>0thenprint"my move "v$(bq);
- 170 print" your move? [157]"
- 180 geta$
- 190 ifa$=""then180
- 200 print" your move ";a$
- 210 if(a$>"0"anda$<"6")thenbq=asc(a$)-48:goto240
- 220 if(a$>="a"anda$<="e")thenbq=asc(a$)-59:goto240
- 230 goto150
- 240 aq=1:gosub720
- 260 pokelz,0:sysrt:ifpeek(cz)=1thenprint"you win! ":t4=t4+1:goto1080
- 270 ifpeek(cz+1)=1thenprint"i win! ":s4=s4+1:goto1080
- 280 ifcc<4then350
- 290 sys25008
- 300 bq=peek(28940):ifbq=0thenbq=1
- 310 aq=-1:gosub720
- 320 pokelz,0:sysrt:ifpeek(cz+1)=1thenprint"i win! ":s4=s4+1:goto1080
- 330 ifpeek(cz)=1thenprint"you win! ":t4=t4+1:goto1080
- 340 goto150
- 350 cc=cc+1:bq=int(rnd(xx)*10+1)
- 360 goto310
- 370 rem initialize
- 380 s=1024:dn=40:rem for 40-column screen use dn=40
- 400 mr=8:mc=13
- 410 poke28958,wg
- 420 lc=s+dn*mr+mc:d2=2*dn
- 430 vb=93:hb=64:xx=91:th=114:bh=113:lh=107:rh=115
- 440 printchr$(142)
- 450 ul=112:ur=110:bl=109:br=125
- 460 wh=81:bk=86
- 470 a=28416:cz=28872:pz=28874:lz=28897
- 490 data1,2,3,4,5,a,b,c,d,e
- 500 fori=1to10:readv$(i):next
- 510 fori=0to24:pokea+i,0:nexti
- 520 return
- 530 rem build screen
- 540 print"[147]":sys25344
- 550 fori=1to5
- 560 pokelc+2*i,48+i
- 570 pokelc+d2*i,i
- 580 forj=0to5
- 590 pokelc+d2*i+1+2*j,vb
- 600 pokelc+2*i+d2*j+dn,hb
- 610 nextj:nexti
- 620 fori=1to4:forj=1to4
- 630 pokelc+dn+1+2*i+d2*j,xx
- 640 nextj
- 650 pokelc+dn+1+2*i,th
- 660 pokelc+11*dn+1+2*i,bh
- 670 pokelc+dn+1+d2*i,lh
- 680 pokelc+dn+11+d2*i,rh
- 690 nexti
- 700 pokelc+1+dn,ul:pokelc+dn+11,ur:pokelc+11*dn+1,bl:pokelc+11*dn+11,br
- 705 print"[154]":printtab(25);"your token [209]":printtab(25);"my token [214]"
- 710 return
- 720 rem insert token into current copy of game and also screen.
- 730 rem on entry aq=1 if player is white, -1 if black.
- 740 rem bq in range 1-5 for column, 6-10 for row.
- 750 tq=wh:nq=1:ifaq=-1thentq=bk:nq=255
- 760 cq=bq-1:ifbq>5then870
- 770 gosub980:ifqq=0then840
- 780 fori=qqto1step-1
- 790 iq=i-1
- 800 eq=peek(a+5*iq+cq):pokea+5*i+cq,eq
- 810 vq=peek(lc+d2*i+bq*2)
- 820 pokelc+d2+d2*i+bq*2,vq
- 830 nexti
- 840 pokea+cq,nq
- 850 pokelc+d2+bq*2,tq
- 860 goto970
- 870 cq=bq-6:rq=5*cq:gosub1030
- 880 ifqq=0then950
- 890 fori=qqto1step-1
- 900 iq=i-1
- 910 eq=peek(a+rq+iq):pokea+rq+i,eq
- 920 vq=peek(lc+d2+d2*cq+i*2)
- 930 pokelc+d2+d2*cq+i*2+2,vq
- 940 nexti
- 950 pokea+rq,nq
- 960 pokelc+d2+d2*cq+2,tq
- 970 return
- 980 qq=4
- 990 fori=0to3
- 1000 ifpeek(a+5*i+cq)=0thenqq=i:i=4
- 1010 nexti
- 1020 return
- 1030 qq=4
- 1040 fori=0to3
- 1050 ifpeek(a+rq+i)=0thenqq=i:i=4
- 1060 nexti
- 1070 return
- 1080 print"games: you ";t4;" me ";s4
- 1090 print"want another game?"
- 1100 geta$
- 1110 ifa$=""then1100
- 1120 ifa$><"n"thengosub510:goto90
- 1130 print"thank you":stop
- 1200 print"[147] slide"
- 1210 print" by robert rossa"
- 1220 print" arkansas state university"
- 1230 print:print:print" get five tokens in a row to win"
- 1240 fori=1to2000:next
- 1250 return
-