home *** CD-ROM | disk | FTP | other *** search
- 100 rem alphabet shuffle
- 105 rem by charles phoenix (01/89)
- 110 rem
- 112 goto450:rem goto setup
- 114 rem
- 135 printleft$(dn$,23);:rem print prompt and wait for fire
- 140 print" press fire button to continue."
- 145 if(peek(jy)and16)/16then145
- 150 return
- 155 rem
- 170 printleft$(dn$,vp+tx*4-4):rem print letter at (x,y)
- 175 ifa$=""ora$=" "thenpoke646,0:goto185
- 180 poke646,2+(asc(a$)-65)/gn
- 185 printspc(hp+ty*4-3);" [157][157][157] ";right$(" "+a$,1);" [157][157][157] [146]"
- 190 return
- 195 rem
- 210 m=0:ti$="000000":rem *** main loop
- 215 x=gn:y=gn
- 220 ox=x:oy=y
- 225 rem
- 230 print"[158] moves = ";m
- 235 print"[158]time = ";mid$(ti$,3,2);":";right$(ti$,2)
- 240 rem
- 245 if(peek(jy)and16)/16=0then385
- 250 rem
- 255 jd=notpeek(jy)and15
- 260 ifjd=1orjd=2thenx=x-(jd=1)+(jd=2):ifx>0andx<=gnthen280
- 265 ifjd=4orjd=8theny=y-(jd=4)+(jd=8):ify>0andy<=gnthen280
- 270 x=ox:y=oy:goto230
- 275 rem
- 280 m=m+1:rem increase # of moves
- 285 rem
- 300 tx=x:ty=y:a$=" ":gosub170:rem swap new square with old square
- 305 tx=ox:ty=oy:a$=pg$(x,y):gosub170
- 310 pg$(ox,oy)=pg$(x,y):pg$(x,y)=" "
- 315 rem
- 330 c=gn*gn:rem check for winner
- 335 fori=1togn
- 340 : forj=1togn
- 345 : ifpg$(i,j)=cg$(i,j)thenc=c-1
- 350 : next
- 355 next:ifcthen220
- 365 rem
- 380 print"[147]congratulations....you've done it":goto390:rem end prg
- 385 print"[147]giving up......tsk, tsk"
- 390 print" the current game time is....: ";
- 395 print"[158]";mid$(ti$,3,2);":";right$(ti$,2)
- 400 print" the current # of moves is...:[158]";m
- 405 rem
- 410 fori=1to500:next:rem small delay
- 415 gosub135:rem wait for fire button
- 420 goto480:rem goto setup
- 425 rem
- 445 rem
- 450 dim cg$(5,5),pg$(5,5):rem initialize
- 455 jy=56320:rem for joystick #1 change 56320 to 56321
- 460 dn$=""
- 465 rem
- 480 poke53280,0:poke53281,0:rem title screen
- 485 print"[147] the alphabet shuffle"
- 490 print"[158] [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]
- 495 [153]" 1) sysbeginner game........ 3 by 3 grid
- 500 print" 2) [158]intermediate game.... 4 by 4 grid
- 505 [153]" 3) sysexpert game.......... 5 by 5 grid
- 510 print" move joystick (up/down) to select game
- 515 [153]" press fire button to enter
- 520 gn=3:gosub600:rem select game w/joystick
- 525 rem
- 540 if(peek(jy)and16)/16=0then650
- 545 jd=notpeek(jy)and15
- 550 ifjd<>1andjd<>2then540
- 555 gosub580:goto540
- 575 rem
- 580 print"[144]";:gosub610
- 585 gn=gn+(jd=1)-(jd=2)
- 590 ifgn<3thengn=5
- 595 ifgn>5thengn=3
- 600 print"[158]";
- 605 rem
- 610 printleft$(dn$,5+(gn-2)*3);
- 615 print" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
- 620 [153]" (NULL)(NULL)
- 625 print" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
- 630 [142]
- 635 [143]
- 650 [153]"load instructions for alphabet shuffle":[143] instruction screen
- 655 [153]"sys usrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusr
- 660 print" the object of this game is quite
- 665 [153]" simple. just rearrange the letters
- 670 print" into [158]alphabetical order.
- 675 [153]" tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(
- 680 print" when the game is completed each
- 685 [153]" row will be the same color.
- 690 print" to quit playing and try again
- 695 [153]" press the fire button
- 700 print"[158] please wait.....setting up
- 705 [143]
- 720 [129]i[178]1[164]gn:[143] setup winning grid
- 725 : [129]j[178]1[164]gn
- 730 : cg$(i,j)[178][199](65[170](i[171]1)[172]gn[170](j[171]1))
- 735 : pg$(i,j)[178]" "
- 740 : [130]
- 745 [130]:cg$(gn,gn)[178]" "
- 755 [143]
- 770 [129]i[178]65[164]63[170]gn[172]gn:[143] setup playing grid
- 775 : x[178][181]([187](1)[172](gn[171]1)[170]1.5)
- 780 : y[178][181]([187](1)[172](gn[171]1)[170]1.5)
- 785 : [139]x[172]y[178]gn[172]gn[167]775
- 790 : [139]pg$(x,y)[179][177]" "[167]775
- 795 : pg$(x,y)[178][199](i)
- 800 [130]
- 820 [141]135:[143] wait for fire button
- 825 [143]
- 830 hp[178]((38[171]gn[172]4)[173]2):vp[178]((26[171]gn[172]4)[173]2)
- 840 [143]
- 845 [153]"loadsys";[200](dn$,vp);:[143] print finished grid
- 850 [153][166]hp);"or";[201]("tantantan=tantantan=tantantan=tantantan=tantantan^",4[172]gn)
- 855 [129]i[178]1[164]gn
- 860 : [129]j[178]1[164]3
- 865 : [153][166]hp);"(NULL)";[201](" (NULL) (NULL) (NULL) (NULL) (NULL)",4[172]gn)
- 870 : [130]
- 875 : [153][166]hp);"-";[201]("tantantan(NULL)tantantan(NULL)tantantan(NULL)tantantan(NULL)tantantan<",4[172]gn)
- 880 [130]
- 885 [153]"on";[166]hp);"/";[201]("tantantan>tantantan>tantantan>tantantan>tantantanexp",4[172]gn)
- 890 [143]
- 905 [129]tx[178]1[164]gn:[143] print grid letters
- 910 : [129]ty[178]1[164]gn
- 915 : a$[178]pg$(tx,ty)
- 920 : [141]170
- 925 : [130]
- 930 [130]
- 935 [143]
- 940 [137]210:[143] goto main loop
-