X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FSwitching.js;h=d898ff634bb3d35735dfc3339e37a736917bb7dc;hb=26b8e4f7c71030d49e44fe1d89632ef91b886d67;hp=ee84e4ca6385e92f1db646b7224a64634fc4b1ed;hpb=0b7d99ecbb5dedc02cd96c457b5fc2962db9b297;p=vchess.git diff --git a/public/javascripts/variants/Switching.js b/public/javascripts/variants/Switching.js index ee84e4ca..d898ff63 100644 --- a/public/javascripts/variants/Switching.js +++ b/public/javascripts/variants/Switching.js @@ -57,7 +57,7 @@ class SwitchingRules extends ChessRules const piece = this.getPiece(x,y); const steps = V.steps[V.ROOK].concat(V.steps[V.BISHOP]); const kp = this.kingPos[color]; - const oppCol = this.getOppCol(color); + const oppCol = V.GetOppCol(color); for (let step of steps) { let [i,j] = [x+step[0],y+step[1]]; @@ -81,7 +81,7 @@ class SwitchingRules extends ChessRules getAllValidMoves(computer) { const color = this.turn; - const oppCol = this.getOppCol(color); + const oppCol = V.GetOppCol(color); let potentialMoves = []; for (let i=0; i