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