home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 54
/
054.d81
/
challenge
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
89 lines
10 ifa=1 then 60
20 poke53281,0:poke53280,12:pl=0
50 ifa=0thena=1:load"challenge.o",8,1
60 :
70 s=54272:v=53248:poke53276,255:pokev+27,255:pokev+16,0:pokev+28,0
80 forn=stos+24:poken,0:next:pokes+5,144
85 pokes+6,251:poke49378,2:poke49380,1
90 forn=0to6:x=212-28*n:poke49153+n,x
95 poke49161+n,x-21:poke53248+n*2,30+n*30
100 poke53249+n*2,230:next:poke53262,240:poke49152,240:poke49160,219
110 poke53263,230:forn=0to3:poke2040+n,255
115 pokev+39+n,1:next:forn=4to7:poke2040+n,254:pokev+39+n,2:next
120 poke646,peek(53281)-1:poke49383,0
130 poke49374,1:poke53269,0
140 print"[147]"chr$(142)" 1 [146] [152]-[154] knight's challenge"
141 print" 2 [146] [152]- [154]color challenge"
150 print" [155] please choose (1 or 2) [146]";:poke198,0
160 getk$:ifk$=""then160
170 ifk$<>"1"andk$<>"2"then120
180 print"[147] [155] please choose difficulty level"
190 print"[154] pick a number from 1 [146][154] (easy)"
195 print " to 3 [146][154] (hard)"
200 getk1$:ifk1$=""then200
210 k=asc(k1$)-48:ifk<1ork>3then200
220 ifk$="1"thengosub400:poke829,peek(53281)
230 ifk$="2"thengosub600
240 ifpl=0then:sys16385:pl=1
250 poke49377,1:ifpl=1thenpoke174,71:poke175,4
260 poke49396,3:print"[147]"spc(7)"let the challenge begin!"
270 printspc(8)"(use joystick port2)"
275 print"your challenge is to duplicate"
280 printspc(12)"this pattern"
285 print"press f7 [146] during game to see"
290 printspc(12)"this solved puzzle"
295 print" press space bar to begin":c=0
300 c=(1-c):poke53269,c*255:forn=1to100
305 if peek(197)<>60then next n:goto300
310 n=100:next
320 if peek(197)<>64 then320
330 print"[147]shuffling pattern":poke53269,0:poke49383,1
335 for n=1 to 200:next n
340 poke53281,peek(53281)+1:print"[147]":poke53281,peek(53281)-1:poke1095,31
350 forn=1499to1503:poken,48:next
360 poke646,peek(53281)+1
370 poke49374,0:print""spc(34)" moves"
375 poke53269,255:poke49377,0:poke49379,0
380 ifpeek(49379)=1thenpoke49377,1:goto700
381 geta$:ifa$="q"then pokes+24,.:goto120
390 goto380
400 ifpl=1then poke53281,peek(829):goto550
410 poke53269,255
420 poke646,peek(53281)+1
430 print"[147]"spc(10)" to change colors "
435 printspc(9)" press function keys"
440 print" f1 [146] changes screen color"
445 print" f3 [146] changes background color"
450 print" f5 [146] changes chesspiece 1 color"
460 print" f7 [146] changes chesspiece 2 color"
470 print" press space bar to start"
480 getk2$:ifk2$=""then480
490 if k2$=" "thenprint"[147]":goto550
500 ifk2$="[133]"thenx=peek(53281)+1:gosub680:poke53281,x:goto420
510 ifk2$="[134]"thenx=peek(53280)+1:gosub680:poke53280,x
520 ifk2$="[135]"thengosub640
530 ifk2$="[136]"thengosub660
540 goto480
550 print" please wait...":forr=0to6:co=peek(49378):sh=0:forc=0to7
560 ifc>3thenco=peek(49380):ifk=1thensh=1
570 ifk=2thensh=int(c/2)+2*(c>3)
580 ifk=3thensh=c+4*(c>3)
590 poke49170+c+r*8,co:poke49226+c+r*8,255-sh:next:next:return
600 print" please wait...":forr=0to6:co=0:forc=0to7
605 ifk=1thenifc>3thenco=1
610 ifk=2thenco=int(c/2)
620 ifk=3thenco=c
630 poke49170+c+r*8,co+1:poke49226+c+r*8,251:next:next
635 forn=16064to16127:poken,255:next:poke53281,0:return
640 forn=0to3:x=peek(v+39+n)+1:ifx>255thenx=0
650 pokev+39+n,x:next:poke49380,x:return
660 forn=4to7:x=peek(v+39+n)+1:ifx>255thenx=0
670 pokev+39+n,x:next:poke49378,x:return
680 ifx>253thenx=0
690 return
700 pokes+24,15:forj=0to1:restore:forj1=1to15:readhf,lf:poke53269,lf
710 pokes+1,hf:pokes,lf:pokes+4,33-j*16:forn=1to80:next:pokes+4,32-j*16
720 forn=1to100:next:next:forn=1to100:next:next:pokes+24,0:goto120
730 data21,31,21,31,22,96,25,30,25,30,22,96,21,31,18,209,16,195,16,195
740 data18,209,21,31,21,31,18,209,18,209