scaffold

scaffold
This commit is contained in:
rncwnd 2025-07-03 19:23:10 +01:00
commit 2a3f0436d8
Signed by: rncwnd
GPG key ID: 05EF307E0712FDAA
11 changed files with 5394 additions and 0 deletions

19
parser/src/header.rs Normal file
View file

@ -0,0 +1,19 @@
struct Header {
player: Player,
}
/// Defines the play side.
#[derive(FromRepr, Debug, PartialEq, Clone)]
#[repr(u8)]
enum Player {
One, // SP
Two, // Couple play
Three, // DP
Four, // Battle Play. This is very, very rare
}
impl Default for Player {
fn default() -> Self {
Self::One
}
}

14
parser/src/lib.rs Normal file
View file

@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}