X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=a9b6a6a1367192ce96d7eb24ef2d4cf6bd506f80;hp=4c90f1d87b864fec1a747687a00d949941855e34;hb=2da551a3aafd653a9b40bde5e182761bc6c12ae5;hpb=0b0f03354fdb4ffbcf9c0dd208d42c80235ade45 diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 4c90f1d8..a9b6a6a1 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 }; } };