parametric game fules. minor simulator refactoring

This commit is contained in:
azykov@mail.ru
2026-02-19 22:19:05 +03:00
parent ef5caab748
commit d07f2043e7
22 changed files with 1170 additions and 181 deletions
+12 -1
View File
@@ -2,10 +2,21 @@ import { makeGame, ResourceGenerator, ResourceSet } from "@idle-economy/engine";
import { makeAutoObservable } from "mobx";
import { Notation, Presets } from 'eternal_notations';
import { now } from "../tools/time";
import { defaultGameRulesOptions, type GameRulesOptions } from "@idle-economy/engine/src/rulesets/rules";
const gameRulesOptions: GameRulesOptions = defaultGameRulesOptions;
// const gameRulesOptions: GameRulesOptions = {
// startingResources: 0,
// generationBasePrice: 1,
// generationPower: 1.2,
// upgradeBasePrice: 2000,
// upgradeFactor: 1.01,
// }
export class Root {
private readonly game = makeGame();
private readonly game = makeGame(gameRulesOptions);
public resources: ResourceSet = new ResourceSet();
public generators: ResourceGenerator[] = [];