From: Benjamin Auder Date: Sun, 14 Nov 2021 22:24:00 +0000 (+0100) Subject: Fix Zen chess (not great fix: TODO) X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/current/img/pieces/common.css?a=commitdiff_plain;h=67c5c19892b8bf3d851c4b7f4fcb1514b8491091;p=xogo.git Fix Zen chess (not great fix: TODO) --- diff --git a/base_rules.js b/base_rules.js index 5b49077..da72320 100644 --- a/base_rules.js +++ b/base_rules.js @@ -1391,6 +1391,7 @@ export default class ChessRules { return; //king isn't captured this way } const steps = pieces[p].attack || pieces[p].steps; + if (!steps) return; //cannibal king for example (TODO...) const range = pieces[p].range; steps.forEach(s => { // From x,y: revert step diff --git a/common.css b/common.css index f1b2b79..8159d76 100644 --- a/common.css +++ b/common.css @@ -31,7 +31,7 @@ main > div { margin-top: 25vh; min-height: 500px; min-width: 320px; - /*max-width: 800px;*/ /*unnecessary*/ + max-width: 800px; /*useful for rules display only*/ } @media(max-height: 800px) {