fixed multiplayer

This commit is contained in:
evanpelle
2024-08-14 08:12:29 -07:00
parent 001722bd59
commit a417a7b2a3
8 changed files with 15 additions and 23 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ class Client {
if (this.game != null) {
return
}
this.game = createClientGame(getUsername(), this.random.nextID(), lobbyID, defaultConfig, map)
// TODO make id more random, if two player join same millisecond get same id.
this.game = createClientGame(getUsername(), new PseudoRandom(Date.now()).nextID(), lobbyID, defaultConfig, map)
this.game.joinLobby()
})
}