projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improvements - untested
[vchess.git]
/
client
/
src
/
components
/
BaseGame.vue
diff --git
a/client/src/components/BaseGame.vue
b/client/src/components/BaseGame.vue
index
100f7ef
..
9783c71
100644
(file)
--- a/
client/src/components/BaseGame.vue
+++ b/
client/src/components/BaseGame.vue
@@
-355,13
+355,13
@@
export default {
})();
};
const afterMove = (smove, initurn) => {
})();
};
const afterMove = (smove, initurn) => {
- if (this.st.settings.sound == 2)
- new Audio("/sounds/move.mp3").play().catch(() => {});
if (this.vr.turn != initurn) {
// Turn has changed: move is complete
if (this.vr.turn != initurn) {
// Turn has changed: move is complete
- if (!smove.fen)
+ if (!smove.fen)
{
// NOTE: only FEN of last sub-move is required (thus setting it here)
smove.fen = this.vr.getFen();
// NOTE: only FEN of last sub-move is required (thus setting it here)
smove.fen = this.vr.getFen();
+ this.emitFenIfAnalyze();
+ }
this.inMultimove = false;
const score = this.vr.getCurrentScore();
if (score != "*") {
this.inMultimove = false;
const score = this.vr.getCurrentScore();
if (score != "*") {
@@
-408,10
+408,8
@@
export default {
if (received && this.cursor < this.moves.length - 1)
this.gotoEnd();
playMove();
if (received && this.cursor < this.moves.length - 1)
this.gotoEnd();
playMove();
- this.emitFenIfAnalyze();
},
cancelCurrentMultimove: function() {
},
cancelCurrentMultimove: function() {
- // Cancel current multi-move
const L = this.moves.length;
let move = this.moves[L-1];
if (!Array.isArray(move)) move = [move];
const L = this.moves.length;
let move = this.moves[L-1];
if (!Array.isArray(move)) move = [move];
@@
-440,8
+438,6
@@
export default {
if (light) this.cursor--;
else {
this.positionCursorTo(this.cursor - 1);
if (light) this.cursor--;
else {
this.positionCursorTo(this.cursor - 1);
- if (this.st.settings.sound == 2)
- new Audio("/sounds/undo.mp3").play().catch(() => {});
this.incheck = this.vr.getCheckSquares(this.vr.turn);
this.emitFenIfAnalyze();
}
this.incheck = this.vr.getCheckSquares(this.vr.turn);
this.emitFenIfAnalyze();
}