projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Almost fixed clocks update (incoherent FEN state)
[vchess.git]
/
client
/
src
/
views
/
Hall.vue
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
22aa53e
..
4d1d809
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-591,7
+591,8
@@
export default {
newGame: function(gameInfo) {
// Extract times (in [milli]seconds), set clocks
const tc = extractTime(gameInfo.timeControl);
newGame: function(gameInfo) {
// Extract times (in [milli]seconds), set clocks
const tc = extractTime(gameInfo.timeControl);
- const IPlayFirst = (gameInfo.players[0].sid == this.st.user.sid);
+ let initime = [...Array(gameInfo.players.length)];
+ initime[0] = Date.now();
const game =
{
// Game infos: constant
const game =
{
// Game infos: constant
@@
-606,7
+607,7
@@
export default {
fen: gameInfo.fen,
moves: [],
clocks: [...Array(gameInfo.players.length)].fill(tc.mainTime),
fen: gameInfo.fen,
moves: [],
clocks: [...Array(gameInfo.players.length)].fill(tc.mainTime),
- initime:
(IPlayFirst ? Date.now() : undefined)
,
+ initime:
initime
,
score: "*",
};
GameStorage.add(game);
score: "*",
};
GameStorage.add(game);