Tetris attempt, getting stuck

https://arcade.makecode.com/S79511-60475-16395-95717

I’m working on a tetris clone in makecode, and i’ve gotten pretty far along so far. There are a few unfinished things (score, can’t hold to move piece left/right yet, the hold for soft drop is very scuffed right now etc.) but I’m looking for help on my line clearing code, specifically the “lowerHangingRows” function.

It seems to work well when clearing 1 or 2 rows, but doesn’t work when clearing 3 or 4. If anyone smarter than me can make sense of my code, advice would be greatly appreciated.

2 Likes

Hi, i changed the block “for rowchange from 0 to length of array empty rows -1” for “for rowchange from 0 to length of array empty rows +2” and it worked.

For the down button, I changed “on down button repeat” by “forever if is down button pressed”

I also did that for the left and right controls

Here is the code: https://arcade.makecode.com/S38316-56490-24552-06360.

1 Like

Thank you for taking the time to look through this! I’ve learnt a lot more about makecode since working on this, it might be time to revisit it! Thanks again :black_heart:

2 Likes