This commit is contained in:
Forrest 2026-09-28 01:56:25 -04:00
parent 746d218eda
commit e590baf28d
44 changed files with 8308 additions and 0 deletions

29
sim/src/rules.ts Normal file
View file

@ -0,0 +1,29 @@
/**
* Every number from rules.md that a rule variant might change. Pass a modified copy to
* createGame to A/B test a rule.
*/
export interface RulesConfig {
startingRam: number;
openingHand: number;
/** Grid locations needed to win (starting Servers don't count). */
winLocations: number;
/** Player turns before the game is called a draw. */
maxTurns: number;
/** RAM paid on capture, by level. */
levelRam: Record<number, number>;
/** Cost to place, upgrade to, or clear a Firewall of each level; index 0 = Lv 1. */
firewallCost: readonly number[];
maxProgramsPerLocation: number;
deck: { avatars: number; servers: number; main: number; maxCopies: number };
}
export const DEFAULT_RULES: RulesConfig = {
startingRam: 4,
openingHand: 7,
winLocations: 10,
maxTurns: 200,
levelRam: { 1: 4, 2: 4, 3: 6, 4: 8, 5: 10 },
firewallCost: [2, 4, 8],
maxProgramsPerLocation: 2,
deck: { avatars: 4, servers: 20, main: 30, maxCopies: 2 },
};