Skip to content

Commit

Permalink
🚸 Enable landscape color mode when loading finished game
Browse files Browse the repository at this point in the history
  • Loading branch information
vegeta897 committed Apr 19, 2024
1 parent 7eaceb4 commit 18f39ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/data-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ export function playDaily() {
store.answerDaily.set(dailyWord)
}
resetGuess()
store.showEndView.set(get(store.gameFinished))
const gameFinished = get(store.gameFinished)
store.showEndView.set(gameFinished)
store.landscapeForceColor.set(gameFinished)
store.landscapeNewGame.set(true)
store.landscapeWideView.set(false)
store.landscapeForceColor.set(false)
}

export function playRandom(word?: string) {
Expand All @@ -63,10 +64,11 @@ export function playRandom(word?: string) {
store.answerRandom.set(answer)
}
resetGuess()
store.showEndView.set(get(store.gameFinished))
const gameFinished = get(store.gameFinished)
store.showEndView.set(gameFinished)
store.landscapeForceColor.set(gameFinished)
store.landscapeNewGame.set(true)
store.landscapeWideView.set(false)
store.landscapeForceColor.set(false)
}

export function createNewBoard(): Board {
Expand Down

0 comments on commit 18f39ae

Please sign in to comment.