X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FSwitching.js;h=04bb110c0489ad3f56ae2abdc9d61aafa8da1fce;hb=b955c65b942d09d24b5c3bed0d755d4f2f8f71f1;hp=ee84e4ca6385e92f1db646b7224a64634fc4b1ed;hpb=0b7d99ecbb5dedc02cd96c457b5fc2962db9b297;p=vchess.git diff --git a/public/javascripts/variants/Switching.js b/public/javascripts/variants/Switching.js index ee84e4ca..04bb110c 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