Skip to content

Commit

Permalink
Fix: not save to history loaded games
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Ratajczak committed Jan 2, 2025
1 parent 3435760 commit e6f7090
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/game/board/logic.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const setNewMove = (fieldID: string) => {
id: fieldID,
text: userState.playerTurn
});
userState.isGameLoaded = false;
userState.playerTurn = userState.playerTurn === 'O' ? 'X' : 'O';
userState.move++;
localStorage.setItem('temporaryHistory', JSON.stringify(userState));
Expand Down

0 comments on commit e6f7090

Please sign in to comment.