X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=base_rules.js;h=b315fd59a94ae77d3e2aa4a366e58245ae6a3805;hb=9aebe2aac02158a4f1c92ad0ac529f8ed245602e;hp=5b1a0136882ef5242376df17ff7c22643ade36bf;hpb=33b427488bb6ee5c505c3a024bccedbef763f80e;p=xogo.git diff --git a/base_rules.js b/base_rules.js index 5b1a013..b315fd5 100644 --- a/base_rules.js +++ b/base_rules.js @@ -2080,7 +2080,7 @@ export default class ChessRules { // will be executed in filterValid() later. ( i != finalSquares[castleSide][0] && - this.underCheck([x, i], oppCol) + this.underCheck([[x, i]], oppCol) ) || ( @@ -2187,8 +2187,6 @@ export default class ChessRules { underCheck(square_s, oppCol) { if (this.options["taking"] || this.options["dark"]) return false; - if (!Array.isArray(square_s[0])) - square_s = [square_s]; return square_s.some(sq => this.underAttack(sq, oppCol)); }