use serde::Deserialize; use super::Character; type Path = (bool, bool, bool); #[derive(Debug, Deserialize)] pub struct Finisher { pub name: String, pub char: Vec, pub level: u8, #[serde(default)] pub previous: Vec, #[serde(default)] pub path: Path, #[serde(default)] pub row: u8, pub goal: String, pub color: String, } impl Finisher { pub fn has_top_path(&self) -> bool { self.path.0 } pub fn has_mid_path(&self) -> bool { self.path.1 } pub fn has_bottom_path(&self) -> bool { self.path.2 } }