X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=base_rules.js;h=68ca909ad1ab75a94e5f97cd8c05d1bfb8a436e6;hb=c7bf7b1b10a6d5059f75f540787aba3daaa435f7;hp=eb01442da0132185abeeac5ed6b56c851c1707fe;hpb=21e8e7122487ae9417c5e7e72c25aa642b7a1226;p=xogo.git diff --git a/base_rules.js b/base_rules.js index eb01442..68ca909 100644 --- a/base_rules.js +++ b/base_rules.js @@ -628,12 +628,12 @@ export default class ChessRules { const ii = (flipped ? this.size.x - 1 - i : i); const jj = (flipped ? this.size.y - 1 - j : j); let fillOpacity = '1'; - if (this.options["dark"] && !this.enlightened[ii][jj]) - fillOpacity = '0.5'; + let classes = this.getSquareColorClass(ii, jj); + if (this.enlightened && !this.enlightened[ii][jj]) + classes += " in-shadow"; // NOTE: x / y reversed because coordinates system is reversed. - // TODO: CSS "wood" style, rect --> style --> background-image ? - board += `