fixes bug when no state has be save yet

quicksave
dstuck 2025-06-24 15:10:20 +02:00
parent ff893396fe
commit 232a4e9936
1 changed files with 10 additions and 7 deletions

View File

@ -133,7 +133,7 @@ public class Game {
} }
/** /**
* Copys the current move list to the savestate * Copies the current move list to the savestate
*/ */
public void quicksave() { public void quicksave() {
// TODO: save the current clocktime // TODO: save the current clocktime
@ -148,6 +148,8 @@ public class Game {
* from the savestate * from the savestate
*/ */
public void quickload() { public void quickload() {
if (this.savestate != null) {
this.board = new Board(); this.board = new Board();
this.board.loadFromFen(startPosFen); this.board.loadFromFen(startPosFen);
@ -157,6 +159,7 @@ public class Game {
logger.info("Quickloaded"); logger.info("Quickloaded");
} }
}
/** /**
* Plays the move on the board and adds it to the movelist * Plays the move on the board and adds it to the movelist