Various cleanups

This commit is contained in:
Cutieguwu
2025-04-07 11:25:42 -04:00
parent 88b3094940
commit dcc76c8585
7 changed files with 14 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
[
Game(
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2), IgnoreScore],
periods: [
Period(
@@ -189,7 +189,7 @@
]
),
Game(
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2), IgnoreScore],
periods: [
Period(
@@ -343,7 +343,7 @@
]
),
Game(
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2)],
periods: [
Period(
@@ -556,7 +556,7 @@
]
),
Game(
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2)],
periods: [
Period(
@@ -766,7 +766,7 @@
]
),
Game(
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2)],
periods: [
Period(
@@ -993,7 +993,7 @@
Game(
// TexasAnM were opponents, but not recorded as
// they were not present; Miller played in place.
version: "0.5.1",
version: "0.6.0",
flags: [Interval(2), IgnoreTeam(TexasAnM)],
periods: [
Period(

2
gamelog/Cargo.lock generated
View File

@@ -19,7 +19,7 @@ dependencies = [
[[package]]
name = "gamelog"
version = "0.5.1"
version = "0.6.0"
dependencies = [
"ron",
"semver",

View File

@@ -1,6 +1,6 @@
[package]
name = "gamelog"
version = "0.5.1"
version = "0.6.0"
edition = "2024"
[dependencies]

View File

@@ -142,6 +142,7 @@ impl Game {
}
pub fn penalties(&self, team: Team) -> usize {
// Knock down nesting?
self.periods
.iter()
.filter_map(|period| {
@@ -405,7 +406,7 @@ mod tests {
],
};
assert!(dbg!(game.deltas(Team::Nebraska)) == vec![10_i8, -3_i8, 5_i8, -2_i8, 12_i8]);
assert!(dbg!(game.deltas(Team::ArizonaState)) == vec![10_i8, 0_i8]);
assert!(game.deltas(Team::Nebraska) == vec![10_i8, -3_i8, 5_i8, -2_i8, 12_i8]);
assert!(game.deltas(Team::ArizonaState) == vec![10_i8, 0_i8]);
}
}

View File

@@ -9,7 +9,7 @@ mod play;
mod terrain;
#[allow(unused)]
pub const MIN_VER: semver::Version = semver::Version::new(0, 5, 0);
pub const MIN_VER: semver::Version = semver::Version::new(0, 6, 0);
// I'm lazy.
pub use action::*;

2
miller/Cargo.lock generated
View File

@@ -64,7 +64,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "gamelog"
version = "0.5.1"
version = "0.6.0"
dependencies = [
"ron",
"semver",

View File

@@ -11,11 +11,7 @@ struct Args {
short,
long,
value_hint = clap::ValueHint::DirPath,
default_value = format!("{}/../templates/logfile.ron", std::env::current_dir()
.expect("Failed to get current working dir.")
.into_os_string()
.to_str()
.unwrap())
default_value = format!("../templates/logfile.ron")
)]
logfile_path: PathBuf,