use rustorio_engine::{
bundle,
gamemodes::{GameMode, StartingResources},
mod_reexports::Tick,
};
use crate::{
Bundle,
guide::Guide,
research::SteelTechnology,
resources::{Copper, CopperOre, Iron, IronOre, Point},
territory::Territory,
};
pub struct TutorialStartingResources {
pub iron: Bundle<Iron, 10>,
pub iron_territory: Territory<IronOre>,
pub copper_territory: Territory<CopperOre>,
pub guide: Guide,
}
impl StartingResources for TutorialStartingResources {
fn init(tick: &Tick) -> Self {
Self {
iron: bundle(),
iron_territory: Territory::new(tick, 5),
copper_territory: Territory::new(tick, 5),
guide: Guide,
}
}
}
pub struct Tutorial;
impl GameMode for Tutorial {
type StartingResources = TutorialStartingResources;
type VictoryResources = Bundle<Copper, 4>;
}
pub struct StandardStartingResources {
pub iron: Bundle<Iron, 10>,
pub iron_territory: Territory<IronOre>,
pub copper_territory: Territory<CopperOre>,
pub steel_technology: SteelTechnology,
}
impl StartingResources for StandardStartingResources {
fn init(tick: &Tick) -> Self {
Self {
iron: bundle(),
iron_territory: Territory::new(tick, 20),
copper_territory: Territory::new(tick, 20),
steel_technology: SteelTechnology,
}
}
}
pub struct Standard;
impl GameMode for Standard {
type StartingResources = StandardStartingResources;
type VictoryResources = Bundle<Point, 200>;
}