1 export function playMove(move, vr
) {
2 if (!Array
.isArray(move)) move = [move];
3 move.forEach(m
=> vr
.play(m
));
6 export function undoMove(move, vr
) {
7 if (!Array
.isArray(move)) move = [move];
8 // If multi-move, undo all submoves from last to first
9 for (let i
= move.length
- 1; i
>= 0; i
--)
13 export function getFilteredMove(move) {
14 if (!Array
.isArray(move)) move = [move];
15 const filtered_move
= move.map(m
=> {
23 return filtered_move
.length
== 1 ? filtered_move
[0] : filtered_move
;