2 const flipped
= (this.playerColor
== 'b');
5 width="2771.2px" height="1700px"
6 class="chessboard_SVG">
10 style="fill:none;stroke:#000000;stroke-width:1px"
11 points="0,-100.0 86.6,-50.0 86.6,50.0 0,100.0 -86.6,50.0 -86.6,-50.0"
15 for (let i
=0; i
< this.size
.x
; i
++) {
16 for (let j
=0; j
< this.size
.y
; j
++) {
17 let classes
= this.getSquareColorClass(i
, j
);
20 id="${this.coordsToId([i, j])}"
23 x="${10*j}" ///////////// + resize ! ratio
27 board
+= "</g></svg>";
31 // neutral-light neutral-dark --> specify per variant in CSS file
32 getSquareColorClass(i
, j
) {
33 return ((i
+j
) % 2 == 0 ? "light-square": "dark-square");
36 // TODO: generalize base_rules.js to not assume size.x == width and size.y == height (not true here).