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