choicesnumber=4 scorer=1 label intro open window 640,512 clear window sel=1 setrgb 1,150,255,100 text 320,250, "CAN YOU GUESS THE COMBINATION?","cc" text 320,340, "Press START to start playing","cb" setrgb 1,255,255,255 text 300,290, "MARKING TYPE","rc" text 340,290, "SHAPE NUMBER","lc" setrgb 1,0,0,200 fill rectangle 181,300 to 300,305 wait 0.3 50 inkey$ if (inkey$()="start") then goto layout close window open window 640,512 else endif if and(peek("port1", 16384) > 0 then if sel=1 then goto marktype elsif sel=2 then goto shapeno else endif endif if and(peek("port1", 128) > 0 then setrgb 1,0,0,200 fill rectangle 181,300 to 300,305 setrgb 1,0,0,0 fill rectangle 341,300 to 461,305 sel=1 elsif and(peek("port1", 32) > 0 then setrgb 1,0,0,0 fill rectangle 181,300 to 300,305 setrgb 1,0,0,200 fill rectangle 341,300 to 461,305 sel=2 else endif goto 50 label marktype clear window setrgb 1,150,255,100 text 320,250, "CAN YOU GUESS THE COMBINATION?","cc" setrgb 1,255,255,255 text 300,290, "COUNT UP","rc" text 340,290, "MARK EACH","lc" setrgb 1,0,0,200 fill rectangle 211,300 to 300,305 wait 0.3 60 inkey$ if and(peek("port1"), 16384) > 0 then goto intro else endif if and(peek("port1"), 128) > 0 then setrgb 1,0,0,200 fill rectangle 211,300 to 300,305 setrgb 1,0,0,0 fill rectangle 341,300 to 431,305 scorer=1 elsif and(peek("port"),32) > 0 then setrgb 1,0,0,0 fill rectangle 211,300 to 300,305 setrgb 1,0,0,200 fill rectangle 341,300 to 431,305 scorer=2 else endif goto 60 label shapeno clear window setrgb 1,150,255,100 text 320,250, "CAN YOU GUESS THE COMBINATION?","cc" setrgb 1,255,255,255 text 320,290, str$(choicesnumber),"cc" wait 0.3 inkey$ if and(peek("port1"), 16384) > 0 then goto intro else endif if and(peek("port1"), 128) > 0 then if choicesnumber=3 then goto 75 else choicesnumber=choicesnumber-1 endif elsif and(peek("port1"), 32) > 0 then if choicesnumber=8 then goto 75 else choicesnumber=choicesnumber+1 endif else endif 75 setrgb 1,0,0,0 fill rectangle 295,278 to 325,302 goto 70 label layout clear window if scorer=1 then if choicesnumber<=5 then diff$="MEGA HARD" else diff$="IMPOSSIBLE" endif else if choicesnumber<5 then diff$="NORMAL" else diff$="EASY" endif endif setrgb 1,255,255,255 text 575,150, "Difficulty","cc" text 575,175, diff$,"cc" text 462.7,66, "KEYS","lc" line 452.5,30 TO 452.5,455 setrgb 1,0,0,255 rectangle 30,30 O 445,455 rectangle 460,30 to 506.5,455 line 462,50 to 504.5,50 line 462.5,75 to 504.5,75 setrgb 1,0,0,20 for 1=0 to 40 step 3 fill rectangle (choicesnumber*50)+45,32, to 445,455 fill rectangle 40,40 to (choicesnumber*50)+37,45+i wait 0.1:next label generator attempt=0 y=50 lin=50:squ=50:tri=50:cir=62.5:cro=50 for i=1 to choicesnumber 100 a=int(ran(8)) if a=0 then if i=1 then: ran1$="sq":elsif i=2 then: ran2$="sq" elsif i=3 then: ran3$="sq":elsif i=4 then: ran4$="sq" elsif i=5 then: ran5$="sq":elsif i=6 then: ran6$="sq" elsif i=7 then: ran7$="sq":elsif i=8 then: ran8$="sq" endif elsif a=1 then if i=1 then: ran1$="tr":elsif i=2 then: ran2$="tr" elsif i=3 then: ran3$="tr":elsif i=4 then: ran4$="tr" elsif i=5 then: ran5$="tr":elsif i=6 then: ran6$="tr" elsif i=7 then: ran7$="tr":elsif i=8 then: ran8$="tr" endif elsif a=2 then if i=1 then: ran1$="ci":elsif i=2 then: ran2$="ci" elsif i=3 then: ran3$="ci":elsif i=4 then: ran4$="ci" elsif i=5 then: ran5$="ci":elsif i=6 then: ran6$="ci" elsif i=7 then: ran7$="ci":elsif i=8 then: ran8$="ci" endif elsif a=3 then if i=1 then: ran1$="cr":elsif i=2 then: ran2$="cr" elsif i=3 then: ran3$="cr":elsif i=4 then: ran4$="cr" elsif i=5 then: ran5$="cr":elsif i=6 then: ran6$="cr" elsif i=7 then: ran7$="cr":elsif i=8 then: ran8$="cr" endif elsif a=4 then if i=1 then: ran1$="up":elsif i=2 then: ran2$="up" elsif i=3 then: ran3$="up":elsif i=4 then: ran4$="up" elsif i=5 then: ran5$="up":elsif i=6 then: ran6$="up" elsif i=7 then: ran7$="up":elsif i=8 then: ran8$="up" endif elsif a=5 then if i=1 then: ran1$="do":elsif i=2 then: ran2$="do" elsif i=3 then: ran3$="do":elsif i=4 then: ran4$="do" elsif i=5 then: ran5$="do":elsif i=6 then: ran6$="do" elsif i=7 then: ran7$="do":elsif i=8 then: ran8$="do" endif elsif a=6 then if i=1 then: ran1$="le":elsif i=2 then: ran2$="le" elsif i=3 then: ran3$="le":elsif i=4 then: ran4$="le" elsif i=5 then: ran5$="le":elsif i=6 then: ran6$="le" elsif i=7 then: ran7$="le":elsif i=8 then: ran8$="le" endif elsif a=7 then if i=1 then: ran1$="ri":elsif i=2 then: ran2$="ri" elsif i=3 then: ran3$="ri":elsif i=4 then: ran4$="ri" elsif i=5 then: ran5$="ri":elsif i=6 then: ran6$="ri" elsif i=7 then: ran7$="ri":elsif i=8 then: ran8$="ri" endif else:goto 100:endif lin=lin+50:squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50 next goto choices label choices lin=470:squ=470:tri=470:cir=482.5:cro=470:y=y+45 gosub trian:y=y+45 gosub up:y=y+45 gosub circl:y=y+45 gosub right:y=y+45 gosub cross:y=y+45 gosub down:y=y+45 gosub squar:y=y+45 gosub left:y=50 goto choice1 label squar setrgb 1,255,80,80 rectangle squ,y to squ+25,y+25 return label trian setrgb 1,50,255,50 triangle tri,y+25 to tri+25,y+25 to tri+12.5,y return label circle setrgb 1,255,0,0 circle cir,y+12.5,13 label cross setrgb 1,50,50,255 line cro,y to cro+25,y+25 line cro+25,y to cro,y+25 return label up setrgb 1,100,100,100 line lin+12.5,y to lin+12.5,y+25 line lin+12.5,y to lin,y+12.5 line lin+12.5,y to lin+25,y+12.5 return label down setrgb 1,100,100,100 line lin+12.5,y to lin+12.5,y+25 line lin+12.5,y+25 to lin+25,y+12.5 line lin+12.5,y+25 to lin,y+12.5 return label left setrgb 1,100,100,100 line lin,y+12.5 to lin+25,y+12.5 line lin,y+12.5 to lin+12.5,y line lin,y+12.5 to lin+12.5,y+25 return label right setrgb 1,100,100,100 line lin,y+12.5 to lin+25,y+12.5 line lin+25,y+12.5 to lin+12.5,y line lin+25,y+12.5 to lin+12.5,y+25 return label choice1 lin=50:squ=50:tri=50:cir=62.5:cro=50:y=y+45 attempt=attempt+1 1000 inkey$ if and(peek("port1"), 32768) > 0 then:cho1$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho1$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho1$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho1$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho1$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho1$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho1$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho1$="ri" gosub right else goto 1000 endif wait 0.3 squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 2000 inkey$ if and(peek("port1"), 32768) > 0 then:cho2$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho2$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho2$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho2$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho2$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho2$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho2$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho2$="ri" gosub right else goto 2000 endif wait 0.3 squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 3000 inkey$ if and(peek("port1"), 32768) > 0 then:cho3$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho3$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho3$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho3$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho3$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho3$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho3$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho3$="ri" gosub right else goto 3000 endif wait 0.3 if choicesnumber=3 then goto marker else endif squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 4000 inkey$ if and(peek("port1"), 32768) > 0 then:cho4$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho4$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho4$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho4$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho4$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho4$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho4$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho4$="ri" gosub right else goto 4000 endif wait 0.3 if choicesnumber=4 then goto marker else endif squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 5000 inkey$ if and(peek("port1"), 32768) > 0 then:cho5$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho5$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho5$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho5$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho5$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho5$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho5$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho5$="ri" gosub right else goto 5000 endif wait 0.3 if choicesnumber=5 then goto marker else endif squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 6000 inkey$ if and(peek("port1"), 32768) > 0 then:cho6$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho6$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho6$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho6$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho6$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho6$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho6$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho6$="ri" gosub right else goto 6000 endif wait 0.3 if choicesnumber=6 then goto marker else endif squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 7000 inkey$ if and(peek("port1"), 32768) > 0 then:cho7$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho7$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho7$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho7$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho7$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho7$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho7$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho7$="ri" gosub right else goto 7000 endif wait 0.3 if choicesnumber=7 then goto marker else endif squ=squ+50:tri=tri+50:cir=cir+50:cro=cro+50:lin=lin+50 8000 inkey$ if and(peek("port1"), 32768) > 0 then:cho8$="sq" gosub squar elsif and(peek("port1"), 4096) > 0 then:cho8$="tr" gosub trian elsif and(peek("port1"), 8192) > 0 then:cho8$="ci" gosub circl elsif and(peek("port1"), 16384) > 0 then:cho8$="cr" gosub cross elsif and(peek("port1"), 16) > 0 then:cho8$="up" gosub up elsif and(peek("port1"), 64) > 0 then:cho8$="do" gosub down elsif and(peek("port1"), 128) > 0 then:cho8$="le" gosub left elsif and(peek("port1"), 32) > 0 then:cho8$="ri" gosub right else goto 8000 endif wait 0.3 label marker yes=0 setrgb 1,0,0,0 fill rectangle 30,460 to 480,485 wait 0.2 if scorer=1 then goto 50000 else endif setrgb 1,255,255,255 if ran1$=cho1$ then text 50,480, "YES" yes=yes+1 else text 53,480, "NO" endif if ran2$=cho2$ then text 100,480, "YES" yes=yes+1 else text 103,480, "NO" endif if ran3$=cho3$ then text 150,480, "YES" yes=yes+1 else text 153,480, "NO" endif if choicesnumber=3 then goto 10000 else endif if ran4$=cho4$ then text 200,480, "YES" yes=yes+1 else text 203,480, "NO" endif if choicesnumber=4 then goto 10000 else endif if ran5$=cho5$ then text 250,480, "YES" yes=yes+1 else text 253,480, "NO" endif if choicesnumber=5 then goto 10000 else endif if ran6$=cho6$ then text 300,480, "YES" yes=yes+1 else text 303,480, "NO" endif if choicesnumber=6 then goto 10000 else endif if ran7$=cho7$ then text 350,480, "YES" yes=yes+1 else text 353,480, "NO" endif if choicesnumber=7 then goto 10000 else endif if ran8$=cho8$ then text 400,480, "YES" yes=yes+1 else text 403,480, "NO" endif 10000 if yes=choicesnumber then text 555,440, "WELL" text 555,455, "DONE" inkey$ close window open window 640,512 goto layout else endif if attempt=8 then text 555,440, "GAME" text 555,455, "OVER" inkey$ close window open window 640,512 goto layout else goto choice1 endif 50000 if ran1$=cho1$ then yes=yes+1 else endif if ran2$=cho2$ then yes=yes+1 else endif if ran3$=cho3$ then yes=yes+1 else endif if choicesnumber=3 then goto 100000 else endif if ran4$=cho4$ then yes=yes+1 else endif if choicesnumber=4 then goto 100000 else endif if ran5$=cho5$ then yes=yes+1 else endif if choicesnumber=5 then goto 100000 else endif if ran6$=cho6$ then yes=yes+1 else endif if choicesnumber=6 then goto 100000 else endif if ran7$=cho7$ then yes=yes+1 else endif if choicesnumber=7 then goto 100000 else endif if ran8$=cho8$ then yes=yes+1 else endif if choicesnumber=8 then goto 100000 else endif 100000 setrgb 1,255,255,255 text ((choicesnumber*50)+80)/2,480,str$(yes)+" correct","cb" goto 10000 rem created by AARON BANKS