rebalancing

This commit is contained in:
evanpelle
2024-09-07 13:35:07 -07:00
parent 8ff03496c6
commit bf7273ad5a
10 changed files with 54 additions and 23 deletions
+3 -2
View File
@@ -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))
}