Commit bd44e05c authored by Tobias Bengfort's avatar Tobias Bengfort
Browse files

automatic pause on reset/step

parent 7a8f320b
......@@ -80,9 +80,6 @@ on('mousedown', '.board-cell', function(state, event) {
});
on('click', '.js-next-gen', function(state) {
if (state.game.playing) {
return;
}
state.game.steps = document.querySelector('[name="steps"]').value;
state.game.playing = true;
play();
......@@ -94,9 +91,7 @@ on('click', '.js-play', function(state) {
});
on('click', '.js-reset', function(state) {
if (state.game.playing) {
return;
}
state.game.playing = false;
state.game.board = clone(state.game.resetGame.board);
state.game.turnCounter = state.game.resetGame.turnCounter;
state.game.tileLimit = state.game.resetGame.tileLimit;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment