- [h('i', { 'class': { "material-icons": true } }, "flag")])
- );
- elementArray.push(gameDiv);
- // if (!!vr.reserve)
- // {
- // let reserve = h('div',
- // {'class':{'game':true}}, [
- // h('div',
- // { 'class': { 'row': true }},
- // [
- // h('div',
- // {'class':{'board':true}},
- // [h('img',{'class':{"piece":true},attrs:{"src":"/images/pieces/wb.svg"}})]
- // )
- // ]
- // )
- // ],
- // );
- // elementArray.push(reserve);
- // }
+ [
+ h('img',
+ {
+ 'class': {"piece":true},
+ attrs: {
+ "src": "/images/pieces/" +
+ this.vr.getReservePpath(this.mycolor,i) + ".svg",
+ }
+ }),
+ h('sup',
+ {style: { "padding-left":"40%"} },
+ [ this.vr.reserve[this.mycolor][VariantRules.RESERVE_PIECES[i]] ]
+ )
+ ]));
+ }
+ let oppReservePiecesArray = [];
+ const oppCol = this.vr.getOppCol(this.mycolor);
+ for (let i=0; i<VariantRules.RESERVE_PIECES.length; i++)
+ {
+ oppReservePiecesArray.push(h('div',
+ {
+ 'class': {'board':true, ['board'+sizeY]:true},
+ attrs: { id: this.getSquareId({x:sizeX+(1-shiftIdx),y:i}) }
+ },
+ [
+ h('img',
+ {
+ 'class': {"piece":true},
+ attrs: {
+ "src": "/images/pieces/" +
+ this.vr.getReservePpath(oppCol,i) + ".svg",
+ }
+ }),
+ h('sup',
+ {style: { "padding-left":"40%"} },
+ [ this.vr.reserve[oppCol][VariantRules.RESERVE_PIECES[i]] ]
+ )
+ ]));
+ }
+ let reserves = h('div',
+ {
+ 'class':{'game':true},
+ style: {"margin-bottom": "20px"},
+ },
+ [
+ h('div',
+ {
+ 'class': { 'row': true },
+ style: {"margin-bottom": "15px"},
+ },
+ myReservePiecesArray
+ ),
+ h('div',
+ { 'class': { 'row': true }},
+ oppReservePiecesArray
+ )
+ ]
+ );
+ elementArray.push(reserves);
+ }