From: Benjamin Auder Date: Fri, 14 Dec 2018 00:01:33 +0000 (+0100) Subject: Fix two bugs in Ultima isAttackedBy... X-Git-Url: https://git.auder.net/variants/Cwda/vendor/doc/html/index.html?a=commitdiff_plain;h=e1cce11566b1fe6f0cfd85517617c1c0c6249761;p=vchess.git Fix two bugs in Ultima isAttackedBy... --- diff --git a/public/javascripts/variants/Ultima.js b/public/javascripts/variants/Ultima.js index 6883c6f0..ac0cf957 100644 --- a/public/javascripts/variants/Ultima.js +++ b/public/javascripts/variants/Ultima.js @@ -386,9 +386,8 @@ class UltimaRules extends ChessRules { // Square (x,y) must be surroundable by two enemy pieces, // and one of them at least should be a pawn (moving). - const dirs = [ [1,0],[0,1],[1,1],[-1,1] ]; - const steps = VariantRules.steps[VariantRules.ROOK] - .concat(VariantRules.steps[VariantRules.BISHOP]); + const dirs = [ [1,0],[0,1] ]; + const steps = VariantRules.steps[VariantRules.ROOK]; const [sizeX,sizeY] = VariantRules.size; for (let dir of dirs) { @@ -417,6 +416,7 @@ class UltimaRules extends ChessRules j3 += step[1]; } if (i3>=0 && i3=0 && j3