use std::rc::Rc; use crate::{state::Effect, world::{Town, Structure}, state::GameState}; pub struct FoundTown{ pub x: usize, pub y: usize, pub town: Rc, } impl Effect for FoundTown { fn apply(&self, state: &mut GameState) { state.world.add_structure(self.x, self.y, Structure::Town(self.town.clone())); } fn description(&self) -> String { format!("{} was founded", self.town.name) } }