tutorial_new_game/
tutorial_new_game.rs

1#![forbid(unsafe_code)]
2
3use rustorio::{self, Bundle, Tick, gamemodes::Tutorial, resources::Copper};
4
5type GameMode = Tutorial;
6
7type StartingResources = <GameMode as rustorio::GameMode>::StartingResources;
8
9fn main() {
10    rustorio::play::<GameMode>(user_main);
11}
12
13#[allow(unused_variables)]
14#[allow(unused_mut)]
15fn user_main(mut tick: Tick, starting_resources: StartingResources) -> (Tick, Bundle<Copper, 4>) {
16    tick.log(true);
17
18    let StartingResources {
19        iron,
20        mut iron_territory,
21        mut copper_territory,
22        guide,
23    } = starting_resources;
24
25    // To start, run the game using `rustorio play tutorial` (or whatever this save is called), and follow the hint.
26    // If you get stuck, try giving the guide other objects you've found, like the `tick` object.
27    guide.hint(iron)
28}