tetris.rb now detects when a game over happens by checking if the tetromino died at the same y value it spawned in at (so the "highest" y value. In quotes because that's actually y index 0 on the gameboard).
When a game over happens, the gameboard is cleared (to empty most of the screen) and the background is set to red. A "GAME OVER" text box is initialized at the center of the screen. Then, after 3 seconds, the Ruby2D window closes and the program exits.
closes #52
tetris.rb
now detects when a game over happens by checking if the tetromino died at the same y value it spawned in at (so the "highest" y value. In quotes because that's actually y index 0 on the gameboard).When a game over happens, the gameboard is cleared (to empty most of the screen) and the background is set to red. A "GAME OVER" text box is initialized at the center of the screen. Then, after 3 seconds, the Ruby2D window closes and the program exits.