2025-06-24 19:56:47 +03:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
|
|
|
|
|
use super::Character;
|
|
|
|
|
|
2026-03-04 01:13:06 +02:00
|
|
|
type Path = (bool, bool, bool);
|
|
|
|
|
|
2025-06-24 19:56:47 +03:00
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
|
pub struct Finisher {
|
|
|
|
|
pub name: String,
|
|
|
|
|
pub char: Vec<Character>,
|
|
|
|
|
pub level: u8,
|
|
|
|
|
#[serde(default)]
|
2026-03-04 01:13:06 +02:00
|
|
|
pub previous: Vec<String>,
|
|
|
|
|
#[serde(default)]
|
|
|
|
|
pub path: Path,
|
2026-03-03 22:51:42 +02:00
|
|
|
#[serde(default)]
|
|
|
|
|
pub row: u8,
|
2025-06-24 19:56:47 +03:00
|
|
|
pub goal: String,
|
|
|
|
|
pub color: String,
|
|
|
|
|
}
|
2026-03-04 01:13:06 +02:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|