X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=base_rules.js;h=da72320413674fd6a57593188e1651f3afb07432;hb=67c5c19892b8bf3d851c4b7f4fcb1514b8491091;hp=5b4907731ce2a30df7ad7e3972350b16bf31ed12;hpb=cc2c71836442d7495ec570f8f78c006ea60852e0;p=xogo.git 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