"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
},
"lodash.defaultsdeep": {
"version": "4.6.1",
"lint": "vue-cli-service lint"
},
"dependencies": {
- "lodash": "^4.17.15",
"vue": "^2.6.10",
"vue-router": "^3.1.3"
},
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.3",
"lint-staged": "^8.2.1",
+ "lodash": "^4.17.15",
"node-sass": "^4.13.0",
"pug": "^2.0.4",
"pug-loader": "^2.4.0",
this.showEndgameMsg(score + " . " + message);
}
}
- if (!this.analyze) { console.log("EMIT NEWMOVE");
+ if (!this.analyze)
this.$emit("newmove", move); //post-processing (e.g. computer play)
- }
},
undo: function(move) {
const navigate = !move;
fenStart: this.gameInfo.fen,
players: players,
mycolor: mycolor,
+ score: "*",
});
this.compWorker.postMessage(["init",this.gameInfo.fen]);
if (mycolor != "w" || this.gameInfo.mode == "auto")
this.playComputerMove();
},
playComputerMove: function() {
-
-console.log("call comp move");
-
this.timeStart = Date.now();
this.compWorker.postMessage(["askmove"]);
},
// TODO: do not process if game is over (check score ?)
processMove: function(move) {
-console.log("play move");
- console.log(move);
// Send the move to web worker (including his own moves)
this.compWorker.postMessage(["newmove",move]);
// subTurn condition for Marseille (and Avalanche) rules
if ((!this.vr.subTurn || this.vr.subTurn <= 1)
&& (this.gameInfo.mode == "auto" || this.vr.turn != this.game.mycolor))
{
-
-console.log("ask new comp move");
-
this.playComputerMove();
}
},
// (AJAX) Request to get rules content (plain text, HTML)
this.content =
require("raw-loader!@/rules/" + vname + "/" + this.st.lang + ".pug")
+ // Next two lines fix a weird issue after last update (2019-11)
+ .replace(/\\[n"]/g, " ")
+ .replace('module.exports = "', '').replace(/"$/, "")
.replace(/(fen:)([^:]*):/g, replaceByDiag);
},
startGame: function(mode) {
"dev": true
},
"postcss": {
- "version": "7.0.21",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz",
- "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==",
+ "version": "7.0.23",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.23.tgz",
+ "integrity": "sha512-hOlMf3ouRIFXD+j2VJecwssTwbvsPGJVMzupptg+85WA+i7MwyrydmQAgY3R+m0Bc0exunhbJmijy8u8+vufuQ==",
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",