Skip to main content

play

Function play 

Source
pub fn play<G>(
    main: fn(Tick, <G as GameMode>::StartingResources) -> (Tick, <G as GameMode>::VictoryResources),
) -> !
where G: GameMode,
Expand description

Runs your play. If it is run multiple times, it will panic. This is to prevent using multiple threads to cheat.

Examples found in repository?
examples/standard_new_game.rs (line 10)
9fn main() {
10    rustorio::play::<GameMode>(user_main);
11}
More examples
Hide additional examples
examples/tutorial_new_game.rs (line 10)
9fn main() {
10    rustorio::play::<GameMode>(user_main);
11}