projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent infinite loops for moves input in Pacosako + Otage
[vchess.git]
/
client
/
src
/
views
/
Rules.vue
diff --git
a/client/src/views/Rules.vue
b/client/src/views/Rules.vue
index
2edd8a8
..
c069eb2
100644
(file)
--- a/
client/src/views/Rules.vue
+++ b/
client/src/views/Rules.vue
@@
-120,12
+120,16
@@
export default {
this.gameInfo.mode = mode;
if (this.gameInfo.mode == "versus") {
CompgameStorage.get(this.gameInfo.vname, (game) => {
this.gameInfo.mode = mode;
if (this.gameInfo.mode == "versus") {
CompgameStorage.get(this.gameInfo.vname, (game) => {
- // NOTE: game might be null
+ // NOTE: game might be null (if none stored yet)
+ if (!!game && !V.IsGoodFen(game.fen)) {
+ // Some issues with stored game: delete
+ CompgameStorage.remove(game.vname);
+ game = null;
+ }
this.$refs["compgame"].launchGame(game);
});
this.$refs["compgame"].launchGame(game);
});
- } else {
- this.$refs["compgame"].launchGame();
}
}
+ else this.$refs["compgame"].launchGame();
},
// The user wants to stop the game:
stopGame: function() {
},
// The user wants to stop the game:
stopGame: function() {