Expand description
One game: Simulation holds a whole tower, its people, its money and
its clock, and every player command and time step goes through it.
use verticopolis_engine::clock::GameMode;
use verticopolis_engine::facilities::Kind;
use verticopolis_engine::sim::Simulation;
let mut sim = Simulation::new_game(42, GameMode::Classic);
for x in 100..124 {
sim.build(Kind::Lobby, 1, x);
}
sim.tick(60.0);
assert!(sim.money < verticopolis_engine::sim::STARTING_MONEY);Structs§
- LogEntry
- One message in the game’s log.
- Simulation
- One game of Verticopolis.
Enums§
- LogKind
- How the game styles a message in its log.
Constants§
- HELD_
HOURS_ SAVE_ VERSION - The version a save with a held hour and no floor run is written at.
- LOG_
RING_ CAP - How many messages
Simulation::logkeeps; the oldest goes first. - PLAIN_
SAVE_ VERSION - The version a save with no tall lobby is written at: the format before
lobbyHeights, which it does not need. - SAVE_
VERSION - The newest save format version this engine writes. It loads every older
version back to the oldest one
crate::identity::identitynames. - STARTING_
MONEY - The money a new game starts with.
- TALL_
LOBBY_ SAVE_ VERSION - The version a save with a tall lobby and no held hour is written at.
Functions§
- save_
version - A save with no held hour is stamped
TALL_LOBBY_SAVE_VERSIONwith a tall lobby, elsePLAIN_SAVE_VERSION;stamped_save_versionalso weighs the held hours. - stamped_
save_ version - A save with no floor run is stamped
HELD_HOURS_SAVE_VERSIONwhen a schedule holds an hour back (an older build runs the whole fleet there), elseTALL_LOBBY_SAVE_VERSIONwith a tall lobby, elsePLAIN_SAVE_VERSION.