- commit
- b180b13e0294d27cc02235a0fa0f7686fa0b5e6e
- parent
- 7baea89b4cffdc5a4f0801331acd0dfa653b0c67
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-10-26 19:15
pause game on winState
Diffstat
| M | src/logic.js | 6 | +++++- |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/logic.js b/src/logic.js
@@ -57,7 +57,11 @@ export const calculateNextGen = function(state) {
57 57
58 58 // Scenariostuff
59 59 if (state.game.winCondition) {
60 -1 state.game.winState = state.game.winCondition(state);
-1 60 const winState = state.game.winCondition(state);
-1 61 if ((winState === true || winState === false) && winState !== state.game.winState) {
-1 62 state.game.winState = winState;
-1 63 state.game.playing = false;
-1 64 }
61 65 }
62 66 };
63 67