mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 06:38:13 +00:00
added deployment
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {defaultConfig} from "../core/configuration/DefaultConfig";
|
||||
import {TerrainMap} from "../core/Game";
|
||||
import {PseudoRandom} from "../core/PseudoRandom";
|
||||
import {ServerMessage, ServerMessageSchema} from "../core/Schemas";
|
||||
import {loadTerrainMap} from "../core/TerrainMapLoader";
|
||||
import {generateUniqueID} from "../core/Util";
|
||||
import {ClientGame, createClientGame} from "./ClientGame";
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
|
||||
@@ -18,6 +18,8 @@ class Client {
|
||||
private lobbiesContainer: HTMLElement | null;
|
||||
private lobbiesInterval: NodeJS.Timeout | null = null;
|
||||
|
||||
private random = new PseudoRandom(1234)
|
||||
|
||||
constructor() {
|
||||
this.lobbiesContainer = document.getElementById('lobbies-container');
|
||||
|
||||
@@ -84,7 +86,7 @@ class Client {
|
||||
if (this.game != null) {
|
||||
return
|
||||
}
|
||||
this.game = createClientGame(getUsername(), generateUniqueID(), lobbyID, defaultConfig, map)
|
||||
this.game = createClientGame(getUsername(), this.random.nextID(), lobbyID, defaultConfig, map)
|
||||
this.game.joinLobby()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user