We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi guys, I am making a makeshift tetris game using cells as a 2darray with booleans and shapes that are also created from the cell class using 1d arrays. I would like to have a general idea or direction in which to go in that's not too complex but that would eliminate shapes within the row that is completed.
Answers
Post your code
when you have an 2D array in that you show the board in (the tetris field) you just copy all lines to the line below
So it looks like all lines fall down one line
The bottom line just gets overwritten from the line above it
So I got multiple issues happening. Whenever the second shape starts falling, it somehow detects blocks in the middle of the grid and stops. I suspect the problem lies within the keyPressed(). The clearLine() is my attempt at scanning the board to see how many columns are filled. Someone recommended I set a counter that detects when 10 columns are filled. If 10 are filled in whatever row, turn all to false. Unfortunately I can't even test the clearLine because the second block won't even make it to the bottom if the first block is moved. Also how do I make it so that when the first block falls and hits the bottom, the keyPressed controls switches to the second block. Sorry for the onslaught of questions. Any help or direction would be highly appreciated.