projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix challenge creation (TODO: decide a challenge structure)
[vchess.git]
/
public
/
javascripts
/
components
/
game.js
diff --git
a/public/javascripts/components/game.js
b/public/javascripts/components/game.js
index
534d9af
..
fb4564f
100644
(file)
--- a/
public/javascripts/components/game.js
+++ b/
public/javascripts/components/game.js
@@
-490,7
+490,7
@@
Vue.component('my-game', {
if (this.cursor == this.moves.length)
this.moves.push(move);
else
if (this.cursor == this.moves.length)
this.moves.push(move);
else
- this.moves = this.moves.slice(0,this.cursor
-1
).concat([move]);
+ this.moves = this.moves.slice(0,this.cursor).concat([move]);
}
// Is opponent in check?
this.incheck = this.vr.getCheckSquares(this.vr.turn);
}
// Is opponent in check?
this.incheck = this.vr.getCheckSquares(this.vr.turn);