Skip to content

Commit

Permalink
Fix undo will not record garbage buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
chouhy committed Dec 18, 2021
1 parent fe38b8d commit b4f3398
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tetris_ai/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,9 @@ void mainscene() {
if (i == j) continue;
if (rule.GarbageBuffer) {
tetris[j].accept_atts.push_back(att);
if (saved_board[j].back().n_pieces == tetris[j].n_pieces) {
saved_board[j].back().accept_atts = tetris[j].accept_atts;
}
tetris[i].total_sent += att;
if (rule.turnbase) tetris[j].env_change = 2;
}
Expand Down

0 comments on commit b4f3398

Please sign in to comment.