mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-06 19:46:45 +00:00
rebalancing
This commit is contained in:
@@ -4,7 +4,8 @@ import {PseudoRandom} from "../core/PseudoRandom";
|
||||
import WebSocket from 'ws';
|
||||
import {ClientID, GameID} from "../core/Schemas";
|
||||
import {Client} from "./Client";
|
||||
import {generateUniqueId} from "../core/Util";
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
|
||||
|
||||
|
||||
export class GameManager {
|
||||
@@ -38,7 +39,7 @@ export class GameManager {
|
||||
const now = Date.now()
|
||||
if (now > this.lastNewLobby + this.config.gameCreationRate()) {
|
||||
this.lastNewLobby = now
|
||||
const id = generateUniqueId()
|
||||
const id = uuidv4()
|
||||
lobbies.push(new GameServer(id, now, this.config))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user