khguide/src/bbs/finisher.rs

35 lines
541 B
Rust
Raw Normal View History

use serde::Deserialize;
use super::Character;
2026-03-04 01:13:06 +02:00
type Path = (bool, bool, bool);
#[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,
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
}
}