set kernel_options no_blank_lines set romsize 8k playfield: X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... X..........X.................... XXXXXXXXXXXX.................... end o=0 : t=0 : u=0 : z=0 get_shape w=1 a=(rand/32)+1 if a=1 then c=3 : d=0 : e=4 : f=0 : g=5 : h=0 : i=6 : j=0 if a=2 then c=3 : d=1 : e=4 : f=1 : g=4 : h=0 : i=5 : j=1 if a=3 then c=3 : d=1 : e=4 : f=1 : g=4 : h=0 : i=5 : j=0 if a=4 then c=3 : d=0 : e=4 : f=0 : g=4 : h=1 : i=5 : j=1 if a=5 then c=3 : d=1 : e=4 : f=2 : g=3 : h=0 : i=3 : j=2 if a=6 then c=3 : d=2 : e=4 : f=0 : g=4 : h=1 : i=4 : j=2 if a=7 then c=3 : d=0 : e=4 : f=0 : g=3 : h=1 : i=4 : j=1 if a=8 then goto get_shape main scorecolor=14 if joy0down then b=b+1 pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on drawscreen b=b+1 if b>30 then b=0 : goto down bank2 if joy0fire then v=v+1 if joy0fire && v>10 then v=0 : goto turn if joy0right then k=k+1 if joy0right && k>10 then k=0 : gosub right if joy0left then l=l+1 if joy0left && l>10 then l=0 : gosub left COLUPF=200 goto main turn pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off w=w+1 if w>4 then w=1 turn_2 if a=1 && w=1 then e=e+1 : f=f-1 : g=g+2 : h=h-2 : i=i+3 : j=j-3 if a=1 && w=2 then e=e-1 : f=f+1 : g=g-2 : h=h+2 : i=i-3 : j=j+3 if a=1 && w=3 then e=e+1 : f=f-1 : g=g+2 : h=h-2 : i=i+3 : j=j-3 if a=1 && w=4 then e=e-1 : f=f+1 : g=g-2 : h=h+2 : i=i-3 : j=j+3 if a=2 && w=2 then c=c+1 : d=d+1 if a=2 && w=3 then g=g-1 : h=h+1 if a=2 && w=4 then i=i-1 : j=j-1 if a=2 && w=1 then c=c-1 : d=d-1 : g=g+1 : h=h-1 : i=i+1 : j=j+1 if a=3 && w=1 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=2 then g=g-1 : i=i-1 : j=j+2 if a=3 && w=3 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=4 then g=g-1 : i=i-1 : j=j+2 if a=4 && w=2 then e=e+1 : c=c+1 : d=d+2 if a=4 && w=3 then w=1 : e=e-1 : c=c-1 : d=d-2 if a=5 && w=2 then c=c+2 : d=d+1 : g=g+2 : h=h+1 if a=5 && w=3 then i=i+1 : j=j-2 : e=e+1 : f=f-2 if a=5 && w=4 then c=c-2 : d=d-1 : e=e-1 : f=f+1 : i=i-1 : j=j+2 if a=5 && w=1 then f=f+1 : g=g-2 : h=h-1 if a=6 && w=2 then e=e-2 : f=f+1 : g=g-2 : h=h+1 if a=6 && w=3 then c=c-1 : d=d-2 : i=i-1 : j=j-2 if a=6 && w=4 then d=d+1 : e=e+1 : g=g+2 : h=h-1 : i=i+1 : j=j+2 if a=6 && w=1 then c=c+1 : d=d+1 : e=e+1 : f=f-1 turning_again if pfread(c, d) then w=w-1 : goto turn_3 if pfread(e, f) then w=w-1 : goto turn_3 if pfread(g, h) then w=w-1 : goto turn_3 if pfread(i, j) then w=w-1 : goto turn_3 goto main turn_3 if a=2 && w=0 then w=4 : c=c+1 : d=d+1 : g=g-1 : h=h+1 : i=i-1 : j=j-1 if a=2 && w=3 then i=i-1 : j=j-1 if a=2 && w=2 then g=g+1 : h=h-1 if a=2 && w=1 then c=c-1 : d=d-1 if a=3 && w=0 then w=4 : g=g-1 : i=i-1 : j=j+2 if a=3 && w=3 then g=g+1 : i=i+1 : j=j-2 if a=3 && w=2 then g=g-1 : i=i-1 : j=j+2 if a=3 && w=4 then g=g+1 : i=i+1 : j=j-2 if a=4 && w=0 then w=2 : e=e+1 : c=c+1 : d=d+2 if a=4 && w=1 then e=e-1 : c=c-1 : d=d-2 if a=5 && w=0 then w=4 : f=f-1 : g=g+2 : h=h+1 if a=5 && w=1 then c=c-2 : d=d-1 : g=g-2 : h=h-1 if a=5 && w=2 then i=i-1 : j=j+2 : e=e-1 : f=f+2 if a=5 && w=3 then c=c+2 : d=d+1 : e=e+1 : f=f-1 : i=i+1 : j=j-2 if a=6 && w=0 then w=4 : c=c-1 : d=d-1 : e=e-1 : f=f+1 if a=6 && w=1 then e=e+2 : f=f-1 : g=g+2 : h=h-1 if a=6 && w=2 then c=c+1 : d=d+2 : i=i+1 : j=j+2 if a=6 && w=3 then d=d-1 : e=e-1 : g=g-2 : h=h+1 : i=i-1 : j=j-2 goto main right pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(c, d) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(e, f) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(g, h) then c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(i, j) then c=c-1 : e=e-1 : g=g-1 : i=i-1 return left pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off c=c-1 : e=e-1 : g=g-1 : i=i-1 if pfread(c, d) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(e, f) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(g, h) then c=c+1 : e=e+1 : g=g+1 : i=i+1 if pfread(i, j) then c=c+1 : e=e+1 : g=g+1 : i=i+1 return bank 2 down pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off d=d+1 : f=f+1 : h=h+1 : j=j+1 if pfread(c, d) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line if pfread(e, f) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line if pfread(g, h) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line if pfread(i, j) then d=d-1 : f=f-1 : h=h-1 : j=j-1 : goto check_line goto main bank1 check_line r=9 drawscreen pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on check_line_2 o=o+1 drawscreen if o=10 && r=0 && pfread(o, r) then u{2}=1 if o=10 && r=1 && pfread(o, r) then u{1}=1 if o=10 && r=2 && pfread(o, r) then u{0}=1 if o=10 && r=3 && pfread(o, r) then t{7}=1 if o=10 && r=4 && pfread(o, r) then t{6}=1 if o=10 && r=5 && pfread(o, r) then t{5}=1 if o=10 && r=6 && pfread(o, r) then t{4}=1 if o=10 && r=7 && pfread(o, r) then t{3}=1 if o=10 && r=8 && pfread(o, r) then t{2}=1 if o=10 && r=9 && pfread(o, r) then t{0}=1 if o<11 && pfread(o, r) then goto check_line_2 r=r-1 : o=0 if r>0 then goto check_line_2 if t>0 || u>0 then goto erase_line rem if t>0 && o=10 then goto erase_line rem if u>0 && o=10 then goto erase_line t=0 : u=0 : o=0 : s=d+1 if s=10 then s=0 goto get_shape bank1 erase_line if t{0} && t{2} && t{4} then u{4}=1 : y=1 : x=8 : goto erase_line_1a if t{0} && t{3} && t{4} then u{4}=1 : y=1 : x=8 : goto erase_line_1a if t{2} && t{4} && t{5} then u{4}=1 : y=1 : x=7 : goto erase_line_1a if t{2} && t{3} && t{5} then u{4}=1 : y=1 : x=7 : goto erase_line_1a if t{3} && t{5} && t{6} then u{4}=1 : y=1 : x=6 : goto erase_line_1a if t{3} && t{4} && t{6} then u{4}=1 : y=1 : x=6 : goto erase_line_1a if t{4} && t{5} && t{7} then u{4}=1 : y=1 : x=5 : goto erase_line_1a if t{4} && t{6} && t{7} then u{4}=1 : y=1 : x=5 : goto erase_line_1a if t{5} && t{7} && u{0} then u{4}=1 : y=1 : x=4 : goto erase_line_1a if t{5} && t{6} && u{0} then u{4}=1 : y=1 : x=4 : goto erase_line_1a if t{6} && u{0} && u{1} then u{4}=1 : y=1 : x=3 : goto erase_line_1a if t{6} && t{7} && u{1} then u{4}=1 : y=1 : x=3 : goto erase_line_1a if t{7} && u{1} && u{2} then u{4}=1 : y=1 : x=2 : goto erase_line_1a if t{7} && u{0} && u{2} then u{4}=1 : y=1 : x=2 : goto erase_line_1a if t{0} && t{3} then u{3}=1 : y=1 : x=8 if t{0} && t{4} then u{3}=1 : y=2 : x=7 if t{2} && t{4} then u{3}=1 : y=1 : x=7 if t{2} && t{5} then u{3}=1 : y=2 : x=6 if t{3} && t{5} then u{3}=1 : y=1 : x=6 if t{3} && t{6} then u{3}=1 : y=2 : x=5 if t{4} && t{6} then u{3}=1 : y=1 : x=5 if t{4} && t{7} then u{3}=1 : y=2 : x=4 if t{5} && t{7} then u{3}=1 : y=1 : x=4 if t{5} && u{0} then u{3}=1 : y=2 : x=3 if t{0} then pfhline 1 9 10 off : drawscreen : z=z+1 : p=8 if t{2} then pfhline 1 8 10 off : drawscreen : z=z+1 : p=7 if t{3} then pfhline 1 7 10 off : drawscreen : z=z+1 : p=6 if t{4} then pfhline 1 6 10 off : drawscreen : z=z+1 : p=5 if t{5} then pfhline 1 5 10 off : drawscreen : z=z+1 : p=4 if t{6} then pfhline 1 4 10 off : drawscreen : z=z+1 : p=3 if t{7} then pfhline 1 3 10 off : drawscreen : z=z+1 : p=2 if u{0} then pfhline 1 2 10 off : drawscreen : z=z+1 : p=1 if u{1} then pfhline 1 1 10 off : drawscreen : z=z+1 : p=0 if u{2} then pfhline 1 0 10 off : drawscreen : z=z+1 erase_line_1a rem drawscreen drawscreen q=1 : rem pfpixel c d on : pfpixel e f on : pfpixel g h on : pfpixel i j on if t>0 && a=1 && w=1 then pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off if t>0 && a=1 && w=3 then pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off if u>0 && a=1 && w=1 then pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off if u>0 && a=1 && w=3 then pfpixel c d off : pfpixel e f off : pfpixel g h off : pfpixel i j off move_blocks_down if q>10 && u{4} then x=x-1 if q>10 && u{3} then x=x-1 if q>10 then p=p-1 : q=1 if u{4} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if u{3} && pfread(q, x) then pfpixel q x off : x=x+y : pfpixel q x on : x=x-y if pfread(q, p) then pfpixel q p off : p=p+z : pfpixel q p on : p=p-z drawscreen q=q+1 if p=0 then move_blocks_down_2 goto move_blocks_down move_blocks_down_2 score=score+z drawscreen t=0 : u=0 : o=0 : z=0 : q=0 drawscreen goto get_shape bank1