62eddea3ee3f739b538d55d4a4e1eb38d5105f55
[xogo.git] / utils / Move.js
1 // class "Move": generic ready-to-play verbose move, standardised format.
2 export default class Move {
3 // o: {appear, vanish, [start,] [end,]}
4 // appear,vanish = arrays of PiPo
5 // start,end = coordinates to apply to trigger move visually (think castle)
6 constructor(o) {
7 this.appear = o.appear;
8 this.vanish = o.vanish;
9 this.start = o.start || { x: o.vanish[0].x, y: o.vanish[0].y };
10 this.end = o.end || { x: o.appear[0].x, y: o.appear[0].y };
11 }
12 };