From 67c5c19892b8bf3d851c4b7f4fcb1514b8491091 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 14 Nov 2021 23:24:00 +0100
Subject: [PATCH] Fix Zen chess (not great fix: TODO)

---
 base_rules.js | 1 +
 common.css    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

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) {
-- 
2.44.0