game-of-death

antagonistic game of life  https://xi.github.io/game-of-death/
git clone https://git.ce9e.org/game-of-death.git

commit
56d86693909f49ecd334a8bcf90fc6ebd56f6052
parent
6df9a9024a7750f6f1b04d213e6a9e9bc80a5d81
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-10-26 15:54
show winState

Diffstat

M src/logic.js 2 +-
M src/template.js 1 +

2 files changed, 2 insertions, 1 deletions


diff --git a/src/logic.js b/src/logic.js

@@ -57,7 +57,7 @@ export const calculateNextGen = function(state) {
   57    57 
   58    58     // Scenariostuff
   59    59     if (state.game.winCondition) {
   60    -1         return state.game.winCondition(state);
   -1    60         state.winState = state.game.winCondition(state);
   61    61     }
   62    62 };
   63    63 

diff --git a/src/template.js b/src/template.js

@@ -69,6 +69,7 @@ export default function(state) {
   69    69             renderControls(state),
   70    70             h('p', {}, state.game.description),
   71    71             renderBoard(state),
   -1    72             state.winState ? h('p', {}, 'You have won') : null,
   72    73         ]);
   73    74     } else {
   74    75         return renderMenu(state);