X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=0549139877e5ad5ebb1ed6bc54b318febb4ce212;hb=c11afcdfa8678a27ea6c0822f6d3fef83967701b;hp=4c90f1d87b864fec1a747687a00d949941855e34;hpb=2a0672a98b555f0fecfd951d583e69419769d411;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 4c90f1d8..05491398 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -22,8 +22,8 @@ export const Move = class Move { constructor(o) { this.appear = o.appear; this.vanish = o.vanish; - this.start = o.start ? o.start : { x: o.vanish[0].x, y: o.vanish[0].y }; - this.end = o.end ? o.end : { x: o.appear[0].x, y: o.appear[0].y }; + this.start = o.start || { x: o.vanish[0].x, y: o.vanish[0].y }; + this.end = o.end || { x: o.appear[0].x, y: o.appear[0].y }; } }; @@ -136,6 +136,11 @@ export const ChessRules = class ChessRules { return false; } + // At some stages, some games could wait clicks only: + onlyClick() { + return false; + } + // Some variants use click infos: doClick() { return null;