X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FMarseille.js;h=0d228b0c0407a40baf7a0f903d06138f4d61c80d;hb=3fa426b632d92a65843038a161677069de5db27e;hp=618e8330a1d277efbd6051d986874c67ce6c9728;hpb=25ee546945f9343fe38beb6c20a0c1d95c9fee6c;p=vchess.git diff --git a/public/javascripts/variants/Marseille.js b/public/javascripts/variants/Marseille.js index 618e8330..0d228b0c 100644 --- a/public/javascripts/variants/Marseille.js +++ b/public/javascripts/variants/Marseille.js @@ -233,7 +233,9 @@ class MarseilleRules extends ChessRules const maxeval = V.INFINITY; const color = this.turn; const oppCol = this.getOppCol(this.turn); - +//if (this.moves.length == 25) +// debugger; +console.log("turn before " + this.turn + " " + this.subTurn); // Search best (half) move for opponent turn const getBestMoveEval = () => { let moves = this.getAllValidMoves(); @@ -271,11 +273,16 @@ class MarseilleRules extends ChessRules }; let moves11 = this.getAllValidMoves(); +console.log("turn after " + this.turn + " " + this.subTurn); + +if (this.moves.length == 25) + debugger; + + let doubleMoves = []; // Rank moves using a min-max at depth 2 for (let i=0; i { return (color=="w" ? 1 : -1) * (b.eval - a.eval); }); @@ -306,6 +369,7 @@ class MarseilleRules extends ChessRules { candidates.push(i); } +console.log("turn END " + this.turn + " " + this.subTurn); const selected = doubleMoves[_.sample(candidates, 1)].moves; if (selected.length == 1)