GameSimulations
namespace Griff.Simulations;
public static class GameSimulationsA game playing its own balance simulations (Game.Simulate("Balance")), the same as the editor does. It runs whole games, so it lives here, above the runtime, rather than on Game; scripts reach it as they reach the game.
Methods
Section titled “Methods”Simulate
Section titled “Simulate”public static SimulationResults Simulate(Game game, string name, int? threads = default)Plays the balance simulation called name (see Simulation) with this game’s tables, scenes, prefabs and scripts, headless, and says how it went: each pair’s win rate, turns, damage, gold and XP, and what stands out. The same results in the editor, exported and in the web player. It takes as long as its runs do (thousands take seconds), so call it from a debug menu or a tool rather than every step.