-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Premature gameover on line clear #1
Comments
I think this fixes Issue #1; I was mistakenly updating the highest_occupied_cell twice, once correctly in clear_rows() and then once in the wrong direction in update_score(). Since it was updated twice, it would never move down when rows were cleared - resulting in the highest cell only climbing during gameplay, eventually reaching the gameover condition. #1
* also fix an issue regarding ini parsing - now when a game board is prettyprinted to a .ini file, all lines are prepended with comments so there aren't parsing errors during reading. * existing ini files were updated to reflect this change, as was print_board_state() * test_clearRowsDumpedGame_2() was created to piece-by-piece manually step through the game state process of lowering a piece and clearing the associated rows. * Helper functions were added to tetris_test_helpers() to simplify the process of testing the whole game board for invalid states (like filled rows being left over after a row clear).
Not resolved - similar crash occurred on a 4 row clear in a game a couple minutes ago - see It looks like some weirdness is causing incorrect bit values to show up at the top of the file, which prevents the new piece from moving down - triggering the game over condition. Need to figure out what is causing the corruption in the first place. |
|
Issue possibly fixed in 6a23430, but until i've gone through several rounds of testing trying to break it will leave this open. |
Commit 6a2340 fixed this issue.
|
So far, this seems to happen most with I_PIECE, but idk if that's a necessary part of it.
game.log from a game where this happened:
The first sign of a problem is that "Gravity tick activated" line - for some reason it thinks it can't move the piece down when it's at the top of the board, and that causes the crash.
That print statement is in
check_do_piece_gravity()
, but the source of the problem has to be at/nearcheck_valid_move(tg, T_DOWN)
.The text was updated successfully, but these errors were encountered: