projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO: GameStorage.update + clocks started...
[vchess.git]
/
client
/
src
/
utils
/
storage.js
diff --git
a/client/src/utils/storage.js
b/client/src/utils/storage.js
index
48435b5
..
8a7c526
100644
(file)
--- a/
client/src/utils/storage.js
+++ b/
client/src/utils/storage.js
@@
-110,12
+110,12
@@
export const GameStorage =
// localStorage:
// TODO: also option to takeback a move ? Is fen included in move ?
// NOTE: for live games only (all on server for corr)
// localStorage:
// TODO: also option to takeback a move ? Is fen included in move ?
// NOTE: for live games only (all on server for corr)
- update: function(fen, move
s
, clocks, started, score)
+ update: function(fen, move, clocks, started, score)
{
let gameState = JSON.parse(localStorage.getItem("gameState"));
if (!!fen)
{
{
let gameState = JSON.parse(localStorage.getItem("gameState"));
if (!!fen)
{
- gameState.moves
= moves
;
+ gameState.moves
.push(move)
;
gameState.fen = fen;
gameState.clocks = clocks;
}
gameState.fen = fen;
gameState.clocks = clocks;
}