projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid direct references to (Dark) variant name in BaseGame, Analyse and Board
[vchess.git]
/
client
/
src
/
components
/
Board.vue
diff --git
a/client/src/components/Board.vue
b/client/src/components/Board.vue
index
45c7293
..
bd2612d
100644
(file)
--- a/
client/src/components/Board.vue
+++ b/
client/src/components/Board.vue
@@
-11,6
+11,7
@@
export default {
"vr",
"lastMove",
"analyze",
"vr",
"lastMove",
"analyze",
+ "score",
"incheck",
"orientation",
"userColor",
"incheck",
"orientation",
"userColor",
@@
-46,9
+47,9
@@
export default {
incheckSq[sq[0]][sq[1]] = true;
});
incheckSq[sq[0]][sq[1]] = true;
});
- // Create board element (+ reserves if needed by variant
or mode
)
+ // Create board element (+ reserves if needed by variant)
const lm = this.lastMove;
const lm = this.lastMove;
- const showLight = this.settings.highlight &&
this.vname != "Dark
";
+ const showLight = this.settings.highlight &&
V.ShowMoves == "all
";
const gameDiv = h(
"div",
{
const gameDiv = h(
"div",
{
@@
-72,8
+73,7
@@
export default {
let elems = [];
if (
this.vr.board[ci][cj] != V.EMPTY &&
let elems = [];
if (
this.vr.board[ci][cj] != V.EMPTY &&
- (this.vname != "Dark" ||
- this.analyze ||
+ (!this.vr.enlightened || this.analyze || this.score != "*" ||
(!!this.userColor &&
this.vr.enlightened[this.userColor][ci][cj]))
) {
(!!this.userColor &&
this.vr.enlightened[this.userColor][ci][cj]))
) {
@@
-116,8
+116,9
@@
export default {
"dark-square": (i + j) % 2 == 1,
[this.settings.bcolor]: true,
"in-shadow":
"dark-square": (i + j) % 2 == 1,
[this.settings.bcolor]: true,
"in-shadow":
- this.vname == "Dark" &&
!this.analyze &&
!this.analyze &&
+ this.score == "*" &&
+ this.vr.enlightened &&
(!this.userColor ||
!this.vr.enlightened[this.userColor][ci][cj]),
highlight:
(!this.userColor ||
!this.vr.enlightened[this.userColor][ci][cj]),
highlight: