Declarative collection of scenarios wiring the scenarios()/applyScenario() convention. More...
| Import Statement: | import Clayground.Lab |
Delegate the sandbox root's convention functions to this set:
import Clayground.Lab
ScenarioSet {
id: scenarioSet
Scenario { name: "tower"; script: () => buildTower() }
Scenario { name: "rain"; script: () => spawnRain() }
}
function scenarios() { return scenarioSet.names() }
function applyScenario(n) { scenarioSet.apply(n) }
Applying a scenario resets the SimClock first (seeded randomness restarts), which is what makes scenario runs reproducible.
See also Scenario and SimClock.
scenarios : list<Scenario> |
The scenarios (default property).
bool apply(string name) |
Resets the clock and runs the named scenario's script.
var names() |
Names of all scenarios, for the scenarios() convention.