Minor fixes
This commit is contained in:
parent
8817e5b090
commit
c26fd93087
6 changed files with 26 additions and 18 deletions
|
|
@ -28,7 +28,7 @@ export class GameRules {
|
|||
nextGenerationCount: number;
|
||||
} = {
|
||||
currentGenerationCount: 0,
|
||||
nextGenerationCount: 0,
|
||||
nextGenerationCount: 1,
|
||||
};
|
||||
|
||||
public constructor(startingTimeInSeconds: number) {
|
||||
|
|
@ -94,7 +94,9 @@ export class GameRules {
|
|||
const currentGenerationCount =
|
||||
this.nextGenerationId % 2 === 1 ? evenGenerationCount : oddGenerationCount;
|
||||
|
||||
if (currentGenerationCount <= 100) {
|
||||
const q = currentGenerationCount / settings.agentCount;
|
||||
|
||||
if (currentGenerationCount <= 100 && q < 0.05) {
|
||||
this.nextGenerationId++;
|
||||
this.lastGenerationChangeTimeInSeconds = performance.now() / 1000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue