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
f902fa4868b17a3f2ff2b682951fdda45e2235a3
parent
f5bd06a79ce9dba91a1a338aa39594f0aa519ccb
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-10-20 08:35
fix right click on board

Diffstat

M src/index.js 5 ++++-

1 files changed, 4 insertions, 1 deletions


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

@@ -48,10 +48,13 @@ const play = function() {
   48    48     setTimeout(play, timeout);
   49    49 };
   50    50 
   51    -1 on('mousedown', '.board-cell', function(state) {
   -1    51 on('mousedown', '.board-cell', function(state, event) {
   52    52     if (state.playing || state.steps) {
   53    53         return;
   54    54     }
   -1    55     if (event.buttons != 1) {
   -1    56         return;
   -1    57     }
   55    58     const row = this.parentElement;
   56    59     const board = row.parentElement;
   57    60     const x = Array.prototype.indexOf.call(row.children, this);