delete num fake humans config, this is set by map json file

This commit is contained in:
evanpelle
2024-10-08 20:45:18 -07:00
parent 7235b73b6c
commit e1f7d395f2
6 changed files with 2 additions and 32 deletions
-22
View File
@@ -145,28 +145,6 @@ class Client {
g.stop();
});
}
numFakeHumans(lobby: Lobby): number {
const gameHash = simpleHash(lobby.id)
const totalNumFakeHumans = this.config.numFakeHumans(lobby.id)
const timeLeft = lobby.msUntilStart
const rand = new PseudoRandom(gameHash)
const startTimes: number[] = []
const lobbyTime = this.config.gameCreationRate()
for (let i = 0; i < totalNumFakeHumans; i++) {
startTimes.push(rand.nextInt(0, lobbyTime))
}
startTimes.sort()
let currNumFakeHumans = 0
for (const joinTime of startTimes) {
if (timeLeft < joinTime) {
currNumFakeHumans++
}
}
return currNumFakeHumans
}
}
function refreshUsername(): string {