A filled row is one not consisting of zeros. In other words, a filled row is completely filled with squares.
2 methods have been added to Game in game.rb.
remove_filled_rows, which goes through each row, checks if it's filled, and sets that row to zeros, along with all filled rows above it.
move_all_down moves everything above a certain row down one row. This is to fill in the line(s) of zeros created by remove_filled_rows. move_all_down is called inside remove_filled_rows.
These changes remove filled rows at any position on the gameboard, not just the last row. They also remove multiple filled rows in one tick.
closes #31 closes #39
A filled row is one not consisting of zeros. In other words, a filled row is completely filled with squares.
2 methods have been added to
Game
ingame.rb
.remove_filled_rows
, which goes through each row, checks if it's filled, and sets that row to zeros, along with all filled rows above it.move_all_down
moves everything above a certain row down one row. This is to fill in the line(s) of zeros created byremove_filled_rows
.move_all_down
is called insideremove_filled_rows
.These changes remove filled rows at any position on the gameboard, not just the last row. They also remove multiple filled rows in one tick.