weird tetris

  < > arrow keys to move pieces

  i had to remove the bit of code that clears lines because it made it easier to fit the code, and because i think it's near impossible? let me know if i'm wrong.

  code:

  ::i::

  s,z,q=0,pset,pget

  poke(0x5f2c,3)

  cls()

  rect(4,4,59,59,6)

  ::n::

  s+=1

  h,x,y,p,c=false,30,5,{},ceil(rnd(14))+1

  for i=0,11 do

  p[i]=flr(rnd(2))

  end

  p[4]=1

  ::l::

  rect(5,16,58,16,1)

  for i=0,11 do

  if (p[i]==1) z(x+i%3,y+flr(i/3),0)

  end

  y+=1a=0

  if(btn(⬅️))a=-1

  if(btn(➡️))a=1

  for i=0,11 do

  if (p[i]==1 and q(x+i%3+a,y+flr(i/3))>1)a=0

  end

  x+=a

  for i=0,11 do

  if p[i]==1 then

  if(q(x+i%3,y+flr(i/3)+1)>1)h=true

  z(x+i%3,y+flr(i/3),c)

  end

  end

  if h then

  if (y<17)goto o else goto n

  end

  flip()

  goto l

  ::o::

  cls()

  ?"game over\nscore: "..s.."\n❎->",4,3

  if(btn(❎))goto i

  flip()

  goto o

Comments
Welcome to zddgame comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments

  

Copyright 2023-2025 - www.zddgame.com All Rights Reserved