- commit
- bd44e05c72b6d48c19449d46d4d8ce384600c0dd
- parent
- 7a8f320b9e8622960a478107aec027c526f7c025
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-01-02 09:46
automatic pause on reset/step
Diffstat
| M | src/index.js | 7 | +------ |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/index.js b/src/index.js
@@ -80,9 +80,6 @@ on('mousedown', '.board-cell', function(state, event) {
80 80 });
81 81
82 82 on('click', '.js-next-gen', function(state) {
83 -1 if (state.game.playing) {
84 -1 return;
85 -1 }
86 83 state.game.steps = document.querySelector('[name="steps"]').value;
87 84 state.game.playing = true;
88 85 play();
@@ -94,9 +91,7 @@ on('click', '.js-play', function(state) {
94 91 });
95 92
96 93 on('click', '.js-reset', function(state) {
97 -1 if (state.game.playing) {
98 -1 return;
99 -1 }
-1 94 state.game.playing = false;
100 95 state.game.board = clone(state.game.resetGame.board);
101 96 state.game.turnCounter = state.game.resetGame.turnCounter;
102 97 state.game.tileLimit = state.game.resetGame.tileLimit;