+ if (["human","computer"].includes(this.mode))
+ {
+ if (this.score == "*")
+ {
+ actionArray.push(
+ h('button',
+ {
+ on: { click: this.resign },
+ attrs: { "aria-label": translations['Resign'] },
+ 'class': {
+ "tooltip":true,
+ "play": true,
+ "spaceleft": true,
+ },
+ },
+ [h('i', { 'class': { "material-icons": true } }, "flag")])
+ );
+ }
+ else
+ {
+ // A game finished, and another is not started yet: allow navigation
+ actionArray = actionArray.concat([
+ h('button',
+ {
+ on: { click: e => this.undo() },
+ attrs: { "aria-label": translations['Undo'] },
+ "class": {
+ "play": true,
+ "big-spaceleft": true,
+ },
+ },
+ [h('i', { 'class': { "material-icons": true } }, "fast_rewind")]),
+ h('button',
+ {
+ on: { click: e => this.play() },
+ attrs: { "aria-label": translations['Play'] },
+ "class": {
+ "play": true,
+ "spaceleft": true,
+ },
+ },
+ [h('i', { 'class': { "material-icons": true } }, "fast_forward")]),
+ ]
+ );
+ }
+ }
+ if (["friend","problem"].includes(this.mode))
+ {
+ actionArray = actionArray.concat(
+ [
+ h('button',
+ {
+ on: { click: this.undoInGame },
+ attrs: { "aria-label": translations['Undo'] },
+ "class": {
+ "play": true,
+ "big-spaceleft": true,
+ },
+ },
+ [h('i', { 'class': { "material-icons": true } }, "undo")]
+ ),
+ h('button',
+ {
+ on: { click: () => { this.mycolor = this.vr.getOppCol(this.mycolor) } },
+ attrs: { "aria-label": translations['Flip board'] },
+ "class": {
+ "play": true,
+ "spaceleft": true,
+ },
+ },
+ [h('i', { 'class': { "material-icons": true } }, "cached")]
+ ),
+ ]);
+ }
+ elementArray.push(gameDiv);
+ if (!!this.vr.reserve)
+ {
+ const shiftIdx = (this.mycolor=="w" ? 0 : 1);
+ let myReservePiecesArray = [];
+ for (let i=0; i<VariantRules.RESERVE_PIECES.length; i++)
+ {
+ myReservePiecesArray.push(h('div',