scaffold
scaffold scaffold
This commit is contained in:
commit
2a3f0436d8
11 changed files with 5394 additions and 0 deletions
19
parser/src/header.rs
Normal file
19
parser/src/header.rs
Normal 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
14
parser/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue