projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move 'anonymousCount' which was computed to a method in Hall. Seems more accurate
[vchess.git]
/
client
/
src
/
components
/
BaseGame.vue
diff --git
a/client/src/components/BaseGame.vue
b/client/src/components/BaseGame.vue
index
c85d47e
..
4162dfc
100644
(file)
--- a/
client/src/components/BaseGame.vue
+++ b/
client/src/components/BaseGame.vue
@@
-291,7
+291,7
@@
export default {
if (this.game.mode == "analyze") {
this.$emit(
"fenchange",
if (this.game.mode == "analyze") {
this.$emit(
"fenchange",
- this.lastMove ? this.lastMove.fen : this.game.fenStart
+
!!
this.lastMove ? this.lastMove.fen : this.game.fenStart
);
}
},
);
}
},
@@
-309,8
+309,7
@@
export default {
const playSubmove = (smove) => {
if (!navigate) smove.notation = this.vr.getNotation(smove);
this.vr.play(smove);
const playSubmove = (smove) => {
if (!navigate) smove.notation = this.vr.getNotation(smove);
this.vr.play(smove);
- // Is opponent in check?
- this.incheck = this.vr.getCheckSquares(this.vr.turn);
+ this.lastMove = smove;
if (!navigate) {
if (!this.inMultimove) {
if (this.cursor < this.moves.length - 1)
if (!navigate) {
if (!this.inMultimove) {
if (this.cursor < this.moves.length - 1)
@@
-356,7
+355,8
@@
export default {
if (!smove.fen)
// NOTE: only FEN of last sub-move is required (thus setting it here)
smove.fen = this.vr.getFen();
if (!smove.fen)
// NOTE: only FEN of last sub-move is required (thus setting it here)
smove.fen = this.vr.getFen();
- this.lastMove = smove;
+ // Is opponent in check?
+ this.incheck = this.vr.getCheckSquares(this.vr.turn);
this.emitFenIfAnalyze();
this.inMultimove = false;
if (!noemit) {
this.emitFenIfAnalyze();
this.inMultimove = false;
if (!noemit) {
@@
-442,7
+442,6
@@
export default {
if (this.cursor < minCursor) return; //no more moves
move = this.moves[this.cursor];
}
if (this.cursor < minCursor) return; //no more moves
move = this.moves[this.cursor];
}
- // Caution; if multi-move, undo all submoves from last to first
undoMove(move, this.vr);
if (light) this.cursor--;
else {
undoMove(move, this.vr);
if (light) this.cursor--;
else {