Implemented delta-ing methods w/ unit tests.

This commit is contained in:
Cutieguwu
2025-04-04 18:50:57 -04:00
parent a780d20ee9
commit 589dbd55d0
3 changed files with 146 additions and 2 deletions

View File

@@ -32,6 +32,14 @@ impl Game {
Err(error::TeamsError::NumberFound(teams.len()))
}
}
pub fn deltas(&self) -> Vec<i8> {
self.periods
.iter()
.map(|period| period.deltas())
.collect::<Vec<Vec<i8>>>()
.concat()
}
}
impl PlayHandle for Game {