X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=cc8292c482f70f61c04255063f51b10b16cc168c;hb=0e16cb26f6380f57f1079ece9bdb654243073bde;hp=169fb2d94dc03c077bad2181c3b5eb07ad733cab;hpb=41cb9b940084d6f56351a772f0340ebf0bc8d1bc;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 169fb2d9..cc8292c4 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -2,7 +2,7 @@ // Variants generally inherit from it, and modify some parts. import { ArrayFun } from "@/utils/array"; -import { randInt, sample, shuffle } from "@/utils/alea"; +import { randInt, shuffle } from "@/utils/alea"; export const PiPo = class PiPo //Piece+Position { @@ -512,12 +512,6 @@ export const ChessRules = class ChessRules return (color=="w" ? "b" : "w"); } - // Get next color (for compatibility with 3 and 4 players games) - static GetNextCol(color) - { - return V.GetOppCol(color); - } - // Pieces codes (for a clearer code) static get PAWN() { return 'p'; } static get ROOK() { return 'r'; } @@ -1198,7 +1192,7 @@ export const ChessRules = class ChessRules let candidates = [0]; //indices of candidates moves for (let j=1; j= 3 && Math.abs(moves1[0].eval) < V.THRESHOLD_MATE)