MASSIVE REFACTOR
This commit is contained in:
26
gamelog/src/period.rs
Normal file
26
gamelog/src/period.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use serde::Deserialize;
|
||||
|
||||
#[deprecated(since = "0.2.0", note = "Migrated to Game")]
|
||||
type GameRecord = Game;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct Game {
|
||||
pub version: semver::Version,
|
||||
periods: Vec<Option<Period>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct Period {
|
||||
start: Quarter,
|
||||
end: Option<Quarter>,
|
||||
plays: Vec<super::Play>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub enum Quarter {
|
||||
First,
|
||||
Second,
|
||||
Third,
|
||||
Fourth,
|
||||
Overtime(u8),
|
||||
}
|
||||
Reference in New Issue
Block a user