Skip to content

Commit

Permalink
Stash snapshot after loading game state
Browse files Browse the repository at this point in the history
  • Loading branch information
tehdiplomat committed Apr 8, 2024
1 parent 1a2de09 commit 518e302
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions forge-ai/src/main/java/forge/ai/GameState.java
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ protected void applyGameOnThread(final Game game) {
// prevent interactions with objects from old state
game.copyLastState();

// Store snapshot for restoring
game.stashGameState();

// Set negative or zero life after state effects if need be, important for some puzzles that rely on
// pre-setting negative life (e.g. PS_NEO4).
for (int i = 0; i < playerStates.size(); i++) {
Expand Down

0 comments on commit 518e302

Please sign in to comment.