X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FSwitching.js;h=d898ff634bb3d35735dfc3339e37a736917bb7dc;hp=67078f536202aa55885ae8d9621906b1419d0607;hb=26b8e4f7c71030d49e44fe1d89632ef91b886d67;hpb=c018b304ba439ca92348dcb65715707f5cfcee05 diff --git a/public/javascripts/variants/Switching.js b/public/javascripts/variants/Switching.js index 67078f53..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