From ef66df26559d5ceea6a67b1982f0ec5f4b15f1eb Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Sun, 6 Apr 2025 16:51:22 -0400 Subject: [PATCH 01/21] Add interval flag (doesn't currently do anything) and debate future visualization. --- README.adoc | 10 ++++-- gamelog.ron | 12 +++---- gamelog/Cargo.lock | 2 +- gamelog/Cargo.toml | 2 +- gamelog/src/game.rs | 2 ++ gamelog/src/period.rs | 10 ++---- miller/Cargo.lock | 2 +- miller/src/main.rs | 77 +++++++++++++++++++++---------------------- 8 files changed, 60 insertions(+), 57 deletions(-) diff --git a/README.adoc b/README.adoc index 70872db..660f24a 100644 --- a/README.adoc +++ b/README.adoc @@ -5,8 +5,6 @@ == Prelude -VERY EARLY ALPHA -- NOT YET FUNCTIONAL - For my stats course (4U Data Management) I have to interpret a bunch of data generated in class. In an effort to not spend ages mindlessly using a calculator every summative check-in, I have started this project. @@ -14,6 +12,14 @@ I figured, that since I already had to digitize every note, that I was required == Goals +* [ ] Data Visualizer? +* [ ] Dynamic Web Page? +** Server Side Events? +** IDK frontend web at all. +** plotly.rs? +** charming.rs? +** WASM? + === Gamelog * [*] Data Format ** [*] Support recording multiple games diff --git a/gamelog.ron b/gamelog.ron index 517a1dd..a901153 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -5,7 +5,7 @@ [ Game( version: "0.5.0", - flags: [IgnoreScore], + flags: [Interval(2), IgnoreScore], periods: [ Period( start: First, @@ -190,7 +190,7 @@ ), Game( version: "0.5.0", - flags: [IgnoreScore], + flags: [Interval(2), IgnoreScore], periods: [ Period( start: First, @@ -344,7 +344,7 @@ ), Game( version: "0.5.0", - flags: [], + flags: [Interval(2)], periods: [ Period( start: First, @@ -557,7 +557,7 @@ ), Game( version: "0.5.0", - flags: [], + flags: [Interval(2)], periods: [ Period( start: First, @@ -767,7 +767,7 @@ ), Game( version: "0.5.0", - flags: [], + flags: [Interval(2)], periods: [ Period( start: First, @@ -994,7 +994,7 @@ // TexasAnM were opponents, but not recorded as // they were not present; Miller played in place. version: "0.5.0", - flags: [IgnoreTeam(TexasAnM)], + flags: [Interval(2), IgnoreTeam(TexasAnM)], periods: [ Period( start: First, diff --git a/gamelog/Cargo.lock b/gamelog/Cargo.lock index b1bfb5c..362722b 100644 --- a/gamelog/Cargo.lock +++ b/gamelog/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "gamelog" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ron", "semver", diff --git a/gamelog/Cargo.toml b/gamelog/Cargo.toml index 9bc0a05..f0ecc0c 100644 --- a/gamelog/Cargo.toml +++ b/gamelog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamelog" -version = "0.5.0" +version = "0.5.1" edition = "2024" [dependencies] diff --git a/gamelog/src/game.rs b/gamelog/src/game.rs index efea30a..1c085c3 100644 --- a/gamelog/src/game.rs +++ b/gamelog/src/game.rs @@ -168,8 +168,10 @@ impl Game { #[derive(Debug, Deserialize, Clone, PartialEq)] pub enum Flags { + IgnoreActions, IgnoreTeam(Team), IgnoreScore, + Interval(u8), } #[cfg(test)] diff --git a/gamelog/src/period.rs b/gamelog/src/period.rs index 654d878..3932d23 100644 --- a/gamelog/src/period.rs +++ b/gamelog/src/period.rs @@ -19,7 +19,7 @@ impl Period { let mut record: bool = true; let assume_team_known = assume_team_known.unwrap_or(false); - for event in self.events.iter() { + self.events.iter().for_each(|event| { if let Event::Kickoff(_) | Event::Turnover(_) = event { record = { if team == event.team().unwrap() { @@ -42,7 +42,7 @@ impl Period { if record { events.push(event.to_owned()); } - } + }); // If already handled or assumption override applicable if !first || (first && assume_team_known) { @@ -115,11 +115,7 @@ impl Period { } pub fn is_overtime(&self) -> bool { - if self.start.is_overtime() || self.end.as_ref().is_some_and(|some| some.is_overtime()) { - true - } else { - false - } + self.start.is_overtime() || self.end.as_ref().is_some_and(|some| some.is_overtime()) } } diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 3d598a4..2fb65ea 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -64,7 +64,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "gamelog" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ron", "semver", diff --git a/miller/src/main.rs b/miller/src/main.rs index 58667aa..461bd4c 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -48,50 +48,49 @@ fn main() { // Work on knocking down the nesting here? for game in log.0.iter() { - if let Ok(teams) = game.teams() { - for team in teams { - if !game.flags.contains(&Flags::IgnoreTeam(team.to_owned())) { - // Team is to have their stats recorded this game of file. - let team_idx = stats - .iter() - .position(|stat| { - if stat.team == team.to_owned() { - true - } else { - false - } - }) - .unwrap(); + let teams = match game.teams() { + Ok(teams) => teams, + Err(_) => continue, + }; - stats[team_idx] - .avg_terrain_gain - .push(game.avg_gain(team.to_owned())); - - stats[team_idx] - .avg_terrain_loss - .push(game.avg_loss(team.to_owned())); - - stats[team_idx] - .avg_terrain_delta - .push(game.avg_delta(team.to_owned())); - - stats[team_idx] - .plays_per_quarter - .push(game.avg_plays_per_quarter(team.to_owned())); - - stats[team_idx] - .plays_per_game - .push(game.team_plays(team.to_owned())); - - stats[team_idx] - .penalties_per_game - .push(game.penalties(team.to_owned())); - } + for team in teams { + // Skip team if they are to be ignored this game. + if game.flags.contains(&Flags::IgnoreTeam(team.to_owned())) { + continue; } + + let team_idx = stats + .iter() + .position(|stat| stat.team == team.to_owned()) + .unwrap(); + + stats[team_idx] + .avg_terrain_gain + .push(game.avg_gain(team.to_owned())); + + stats[team_idx] + .avg_terrain_loss + .push(game.avg_loss(team.to_owned())); + + stats[team_idx] + .avg_terrain_delta + .push(game.avg_delta(team.to_owned())); + + stats[team_idx] + .plays_per_quarter + .push(game.avg_plays_per_quarter(team.to_owned())); + + stats[team_idx] + .plays_per_game + .push(game.team_plays(team.to_owned())); + + stats[team_idx] + .penalties_per_game + .push(game.penalties(team.to_owned())); } } - if dbg!(config.display_results) { + if config.display_results { // :#? for pretty-printing. stats.iter().for_each(|team| println!("{:#?}", team)); } -- 2.49.1 From 88b309494099a637c45493478fe118ccb9f68ab4 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Sun, 6 Apr 2025 16:54:08 -0400 Subject: [PATCH 02/21] Update gamelog.ron --- gamelog.ron | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index a901153..c4c05a2 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -4,7 +4,7 @@ [ Game( - version: "0.5.0", + version: "0.5.1", flags: [Interval(2), IgnoreScore], periods: [ Period( @@ -189,7 +189,7 @@ ] ), Game( - version: "0.5.0", + version: "0.5.1", flags: [Interval(2), IgnoreScore], periods: [ Period( @@ -343,7 +343,7 @@ ] ), Game( - version: "0.5.0", + version: "0.5.1", flags: [Interval(2)], periods: [ Period( @@ -556,7 +556,7 @@ ] ), Game( - version: "0.5.0", + version: "0.5.1", flags: [Interval(2)], periods: [ Period( @@ -766,7 +766,7 @@ ] ), Game( - version: "0.5.0", + version: "0.5.1", 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.0", + version: "0.5.1", flags: [Interval(2), IgnoreTeam(TexasAnM)], periods: [ Period( -- 2.49.1 From dcc76c8585338629940beb1781502c95fe620e00 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Mon, 7 Apr 2025 11:25:42 -0400 Subject: [PATCH 03/21] Various cleanups --- gamelog.ron | 12 ++++++------ gamelog/Cargo.lock | 2 +- gamelog/Cargo.toml | 2 +- gamelog/src/game.rs | 5 +++-- gamelog/src/lib.rs | 2 +- miller/Cargo.lock | 2 +- miller/src/main.rs | 6 +----- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index c4c05a2..d3f5687 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -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( diff --git a/gamelog/Cargo.lock b/gamelog/Cargo.lock index 362722b..29cd030 100644 --- a/gamelog/Cargo.lock +++ b/gamelog/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "gamelog" -version = "0.5.1" +version = "0.6.0" dependencies = [ "ron", "semver", diff --git a/gamelog/Cargo.toml b/gamelog/Cargo.toml index f0ecc0c..9888864 100644 --- a/gamelog/Cargo.toml +++ b/gamelog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamelog" -version = "0.5.1" +version = "0.6.0" edition = "2024" [dependencies] diff --git a/gamelog/src/game.rs b/gamelog/src/game.rs index 1c085c3..2ed7852 100644 --- a/gamelog/src/game.rs +++ b/gamelog/src/game.rs @@ -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]); } } diff --git a/gamelog/src/lib.rs b/gamelog/src/lib.rs index 81f722f..e625fa5 100644 --- a/gamelog/src/lib.rs +++ b/gamelog/src/lib.rs @@ -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::*; diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 2fb65ea..4990f65 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -64,7 +64,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "gamelog" -version = "0.5.1" +version = "0.6.0" dependencies = [ "ron", "semver", diff --git a/miller/src/main.rs b/miller/src/main.rs index 461bd4c..411564e 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -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, -- 2.49.1 From 11220d473f53d384a341ae250b7bf73287b24b8e Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Wed, 9 Apr 2025 12:03:14 -0400 Subject: [PATCH 04/21] Moving Team to a more sensible location. --- gamelog/src/event.rs | 15 ++++++++++++++- gamelog/src/lib.rs | 2 +- gamelog/src/play.rs | 13 ------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gamelog/src/event.rs b/gamelog/src/event.rs index caceb1a..c483a4e 100644 --- a/gamelog/src/event.rs +++ b/gamelog/src/event.rs @@ -1,4 +1,4 @@ -use crate::{Down, Play, Team, TerrainState, error}; +use crate::{Down, Play, TerrainState, error}; use serde::Deserialize; type Offence = Team; @@ -76,6 +76,19 @@ impl Event { } } +#[derive(Debug, Deserialize, Clone, PartialEq)] +pub enum Team { + ArizonaState, + #[deprecated(since = "0.2.0", note = "Team left the project.")] + BoiseState, + Colorado, + Iowa, + Nebraska, + SouthCarolina, + Syracuse, + TexasAnM, +} + #[derive(Debug, Deserialize, Clone, PartialEq, Default)] pub enum ScorePoints { #[default] diff --git a/gamelog/src/lib.rs b/gamelog/src/lib.rs index e625fa5..9ed9250 100644 --- a/gamelog/src/lib.rs +++ b/gamelog/src/lib.rs @@ -1,10 +1,10 @@ mod action; mod error; +#[allow(deprecated)] mod event; mod file; mod game; mod period; -#[allow(deprecated)] mod play; mod terrain; diff --git a/gamelog/src/play.rs b/gamelog/src/play.rs index 3c683a4..b65c706 100644 --- a/gamelog/src/play.rs +++ b/gamelog/src/play.rs @@ -26,16 +26,3 @@ pub enum Down { Third, Fourth, } - -#[derive(Debug, Deserialize, Clone, PartialEq)] -pub enum Team { - ArizonaState, - #[deprecated(since = "0.2.0", note = "Team left the project.")] - BoiseState, - Colorado, - Iowa, - Nebraska, - SouthCarolina, - Syracuse, - TexasAnM, -} -- 2.49.1 From dd914d676da42f1fc8e0c13e1037bdabddab01a6 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Wed, 9 Apr 2025 12:04:26 -0400 Subject: [PATCH 05/21] Begin tui --- miller/Cargo.lock | 533 ++++++++++++++++++++++++++++++++++++++++++++- miller/Cargo.toml | 3 + miller/src/main.rs | 8 +- miller/src/tui.rs | 58 +++++ 4 files changed, 599 insertions(+), 3 deletions(-) create mode 100644 miller/src/tui.rs diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 4990f65..67d8745 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -2,12 +2,24 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anstyle" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + [[package]] name = "base64" version = "0.22.1" @@ -23,6 +35,27 @@ dependencies = [ "serde", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "clap" version = "4.5.32" @@ -62,6 +95,114 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +[[package]] +name = "compact_str" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "gamelog" version = "0.6.0" @@ -69,7 +210,18 @@ dependencies = [ "ron", "semver", "serde", - "strum", + "strum 0.27.1", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -78,14 +230,133 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indoc" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" + +[[package]] +name = "instability" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown", +] + [[package]] name = "miller" version = "0.1.0" dependencies = [ "clap", "gamelog", + "ratatui", ] +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "proc-macro2" version = "1.0.94" @@ -104,6 +375,36 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "ratatui" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" +dependencies = [ + "bitflags", + "cassowary", + "compact_str", + "crossterm", + "indoc", + "instability", + "itertools", + "lru", + "paste", + "strum 0.26.3", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.2.0", +] + +[[package]] +name = "redox_syscall" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +dependencies = [ + "bitflags", +] + [[package]] name = "ron" version = "0.9.0" @@ -117,12 +418,37 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + [[package]] name = "rustversion" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "semver" version = "1.0.26" @@ -152,19 +478,83 @@ dependencies = [ "syn", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "smallvec" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] + [[package]] name = "strum" version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ - "strum_macros", + "strum_macros 0.27.1", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", ] [[package]] @@ -196,3 +586,142 @@ name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/miller/Cargo.toml b/miller/Cargo.toml index 8805ca2..e2cfd0f 100644 --- a/miller/Cargo.toml +++ b/miller/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" edition = "2024" license = "MIT" +[dependencies] +ratatui = "0.29" + [dependencies.clap] version = "4.5" default-features = false diff --git a/miller/src/main.rs b/miller/src/main.rs index 411564e..18c40fa 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -1,6 +1,8 @@ +mod tui; + use clap::{ArgAction, Parser}; use core::panic; -use gamelog::{Action, Flags, Key, LogFile, Team}; +use gamelog::{Action, Down, Flags, Key, LogFile, Team}; use std::path::PathBuf; #[derive(Debug, Parser)] @@ -112,6 +114,9 @@ struct TeamStats { least_common_play: Option, most_common_key: Option, least_common_key: Option, + // Traits + // Typical number of downs to achieve 10 yards. + time_to_first_down: Option, } impl TeamStats { @@ -130,6 +135,7 @@ impl TeamStats { least_common_play: None, most_common_key: None, least_common_key: None, + time_to_first_down: None, } } } diff --git a/miller/src/tui.rs b/miller/src/tui.rs new file mode 100644 index 0000000..7f7c228 --- /dev/null +++ b/miller/src/tui.rs @@ -0,0 +1,58 @@ +use std::{io, sync::mpsc}; + +use ratatui::{ + DefaultTerminal, Frame, + crossterm::{ + self, + event::{KeyCode, KeyEventKind}, + }, + layout::Layout, + style::Color as Colour, + widgets::Widget, +}; + +enum Event { + Input(crossterm::event::KeyEvent), +} + +pub struct App { + exit: bool, +} + +impl App { + fn run(&mut self, terminal: &mut DefaultTerminal, rx: mpsc::Receiver) -> io::Result<()> { + while !self.exit { + // Render frame. + terminal.draw(|frame| self.draw(frame))?; + + // Event handler + // unwraps, bc what could go wrong? + match rx.recv().unwrap() { + Event::Input(key_event) => self.handle_key_event(key_event)?, + } + } + + Ok(()) + } + + fn draw(&self, frame: &mut Frame) { + frame.render_widget(self, frame.area()); + } + + fn handle_key_event(&mut self, key_event: crossterm::event::KeyEvent) -> io::Result<()> { + if key_event.kind == KeyEventKind::Press && key_event.code == KeyCode::Char('q') { + self.exit = true; + } + + Ok(()) + } +} + +impl Widget for &App { + fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer) + where + Self: Sized, + { + let layout: Layout; + } +} -- 2.49.1 From d211c1339c747c61fd25600534a296cf4f91475c Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Wed, 9 Apr 2025 12:34:28 -0400 Subject: [PATCH 06/21] Begin no_tui flag. --- miller/src/main.rs | 86 ++++++++++++++-------------------------------- miller/src/tui.rs | 24 ++++++++++--- 2 files changed, 44 insertions(+), 66 deletions(-) diff --git a/miller/src/main.rs b/miller/src/main.rs index 18c40fa..15bdc7c 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -2,8 +2,9 @@ mod tui; use clap::{ArgAction, Parser}; use core::panic; -use gamelog::{Action, Down, Flags, Key, LogFile, Team}; -use std::path::PathBuf; +use gamelog::{Action, Down, Key, LogFile, Team}; +use std::{io, path::PathBuf, sync::mpsc, thread}; +use tui::App; #[derive(Debug, Parser)] #[clap(author, version, about)] @@ -22,9 +23,12 @@ struct Args { // ArgAction::SetTrue by default evaluates to false. #[arg(short, long, action=ArgAction::SetFalse)] display_results: bool, + + #[arg(short, long, action=ArgAction::SetTrue)] + no_tui: bool, } -fn main() { +fn main() -> io::Result<()> { let config = Args::parse(); let log: LogFile = match LogFile::try_from(config.logfile_path) { @@ -32,66 +36,26 @@ fn main() { Err(err) => panic!("Error: Failed to open logfile: {:?}", err), }; - let mut stats = vec![ - TeamStats::new(Team::ArizonaState), - #[allow(deprecated)] - TeamStats::new(Team::BoiseState), - TeamStats::new(Team::Colorado), - TeamStats::new(Team::Iowa), - TeamStats::new(Team::Nebraska), - TeamStats::new(Team::Syracuse), - TeamStats::new(Team::SouthCarolina), - TeamStats::new(Team::TexasAnM), - ]; - - // Work on knocking down the nesting here? - for game in log.0.iter() { - let teams = match game.teams() { - Ok(teams) => teams, - Err(_) => continue, - }; - - for team in teams { - // Skip team if they are to be ignored this game. - if game.flags.contains(&Flags::IgnoreTeam(team.to_owned())) { - continue; - } - - let team_idx = stats - .iter() - .position(|stat| stat.team == team.to_owned()) - .unwrap(); - - stats[team_idx] - .avg_terrain_gain - .push(game.avg_gain(team.to_owned())); - - stats[team_idx] - .avg_terrain_loss - .push(game.avg_loss(team.to_owned())); - - stats[team_idx] - .avg_terrain_delta - .push(game.avg_delta(team.to_owned())); - - stats[team_idx] - .plays_per_quarter - .push(game.avg_plays_per_quarter(team.to_owned())); - - stats[team_idx] - .plays_per_game - .push(game.team_plays(team.to_owned())); - - stats[team_idx] - .penalties_per_game - .push(game.penalties(team.to_owned())); - } + if config.no_tui { + return; } - if config.display_results { - // :#? for pretty-printing. - stats.iter().for_each(|team| println!("{:#?}", team)); - } + let mut app = App { exit: false }; + + // Enter Raw terminal mode. + let mut terminal = ratatui::init(); + + let (tx, rx) = mpsc::channel::(); + + let tx_input_fetcher = tx.clone(); + thread::spawn(move || tui::input_fetcher(tx_input_fetcher)); + + let app_result = app.run(&mut terminal, rx); + + // Exit Raw terminal mode. + ratatui::restore(); + + app_result } #[derive(Debug)] diff --git a/miller/src/tui.rs b/miller/src/tui.rs index 7f7c228..08326e2 100644 --- a/miller/src/tui.rs +++ b/miller/src/tui.rs @@ -11,16 +11,20 @@ use ratatui::{ widgets::Widget, }; -enum Event { +pub enum Event { Input(crossterm::event::KeyEvent), } pub struct App { - exit: bool, + pub exit: bool, } impl App { - fn run(&mut self, terminal: &mut DefaultTerminal, rx: mpsc::Receiver) -> io::Result<()> { + pub fn run( + &mut self, + terminal: &mut DefaultTerminal, + rx: mpsc::Receiver, + ) -> io::Result<()> { while !self.exit { // Render frame. terminal.draw(|frame| self.draw(frame))?; @@ -35,11 +39,11 @@ impl App { Ok(()) } - fn draw(&self, frame: &mut Frame) { + pub fn draw(&self, frame: &mut Frame) { frame.render_widget(self, frame.area()); } - fn handle_key_event(&mut self, key_event: crossterm::event::KeyEvent) -> io::Result<()> { + pub fn handle_key_event(&mut self, key_event: crossterm::event::KeyEvent) -> io::Result<()> { if key_event.kind == KeyEventKind::Press && key_event.code == KeyCode::Char('q') { self.exit = true; } @@ -56,3 +60,13 @@ impl Widget for &App { let layout: Layout; } } + +pub fn input_fetcher(tx: mpsc::Sender) { + loop { + // unwraps, bc what could go wrong? + match crossterm::event::read().unwrap() { + crossterm::event::Event::Key(key_event) => tx.send(Event::Input(key_event)).unwrap(), + _ => (), + } + } +} -- 2.49.1 From 1e8e34a3d40e073541a2783d9f5d27ec0cfb97e8 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Wed, 9 Apr 2025 12:36:18 -0400 Subject: [PATCH 07/21] Complete no_tui flag. --- miller/src/main.rs | 65 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/miller/src/main.rs b/miller/src/main.rs index 15bdc7c..cb11922 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -2,7 +2,7 @@ mod tui; use clap::{ArgAction, Parser}; use core::panic; -use gamelog::{Action, Down, Key, LogFile, Team}; +use gamelog::{Action, Down, Flags, Key, LogFile, Team}; use std::{io, path::PathBuf, sync::mpsc, thread}; use tui::App; @@ -37,7 +37,68 @@ fn main() -> io::Result<()> { }; if config.no_tui { - return; + let mut stats = vec![ + TeamStats::new(Team::ArizonaState), + #[allow(deprecated)] + TeamStats::new(Team::BoiseState), + TeamStats::new(Team::Colorado), + TeamStats::new(Team::Iowa), + TeamStats::new(Team::Nebraska), + TeamStats::new(Team::Syracuse), + TeamStats::new(Team::SouthCarolina), + TeamStats::new(Team::TexasAnM), + ]; + + // Work on knocking down the nesting here? + for game in log.0.iter() { + let teams = match game.teams() { + Ok(teams) => teams, + Err(_) => continue, + }; + + for team in teams { + // Skip team if they are to be ignored this game. + if game.flags.contains(&Flags::IgnoreTeam(team.to_owned())) { + continue; + } + + let team_idx = stats + .iter() + .position(|stat| stat.team == team.to_owned()) + .unwrap(); + + stats[team_idx] + .avg_terrain_gain + .push(game.avg_gain(team.to_owned())); + + stats[team_idx] + .avg_terrain_loss + .push(game.avg_loss(team.to_owned())); + + stats[team_idx] + .avg_terrain_delta + .push(game.avg_delta(team.to_owned())); + + stats[team_idx] + .plays_per_quarter + .push(game.avg_plays_per_quarter(team.to_owned())); + + stats[team_idx] + .plays_per_game + .push(game.team_plays(team.to_owned())); + + stats[team_idx] + .penalties_per_game + .push(game.penalties(team.to_owned())); + } + } + + if config.display_results { + // :#? for pretty-printing. + stats.iter().for_each(|team| println!("{:#?}", team)); + } + + return Ok(()); } let mut app = App { exit: false }; -- 2.49.1 From b146fd26585f09da3009b4c6ad07829888f3d7fb Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Wed, 9 Apr 2025 12:48:55 -0400 Subject: [PATCH 08/21] Update main.rs --- miller/src/main.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/miller/src/main.rs b/miller/src/main.rs index cb11922..ee4ddbd 100644 --- a/miller/src/main.rs +++ b/miller/src/main.rs @@ -21,9 +21,7 @@ struct Args { // Behaviour is backwards. // ArgAction::SetFalse by default evaluates to true, // ArgAction::SetTrue by default evaluates to false. - #[arg(short, long, action=ArgAction::SetFalse)] - display_results: bool, - + /// Provide flag to disable tui and dump info via Debug pretty printing. #[arg(short, long, action=ArgAction::SetTrue)] no_tui: bool, } @@ -93,10 +91,8 @@ fn main() -> io::Result<()> { } } - if config.display_results { - // :#? for pretty-printing. - stats.iter().for_each(|team| println!("{:#?}", team)); - } + // :#? for pretty-printing. + stats.iter().for_each(|team| println!("{:#?}", team)); return Ok(()); } -- 2.49.1 From 53020be0b6f6bf487365d16ba91a467a2d419159 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Sun, 6 Apr 2025 17:03:30 -0400 Subject: [PATCH 09/21] Update README.adoc --- README.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/README.adoc b/README.adoc index 660f24a..bc93b6d 100644 --- a/README.adoc +++ b/README.adoc @@ -12,6 +12,7 @@ I figured, that since I already had to digitize every note, that I was required == Goals +* [ ] Auto Ranking system? * [ ] Data Visualizer? * [ ] Dynamic Web Page? ** Server Side Events? -- 2.49.1 From 503105f1c1652bf308cf0b3472f4f090d44a51b1 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Thu, 10 Apr 2025 19:53:05 -0400 Subject: [PATCH 10/21] Patched in HailMary, Updated the gamelog. --- gamelog.ron | 367 ++++++++++++++++++++++++++++++++++++++++++ gamelog/Cargo.lock | 2 +- gamelog/Cargo.toml | 2 +- gamelog/src/action.rs | 1 + gamelog/src/game.rs | 2 + 5 files changed, 372 insertions(+), 2 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index d3f5687..4757b78 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1105,5 +1105,372 @@ ] ) ] + ), + Game( + version: "0.6.0", + flags: [Interval(3)], + periods: [ + Period( + start: First, + end: None, + events: [ + Kickoff(Nebraska), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionPowerZero, + down: First, + terrain: Yards(10) + ), + Play( + action: StrongFlood, + down: First, + terrain: Yards(10) + ), + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: Yards(13), + ), + Play( + action: PlayActionBoot, + down: Third, + terrain: Yards(13) + ), + Play( + action: SlotOut, + down: Fourth, + terrain: Yards(13) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ) + ] + ), + Period( + start: Second, + end: None, + events: [ + Play( + action: Curls, + down: Second, + terrain: Yards(10) + ), + Play( + action: CrackStudentBodyRightTackle, + down: Third, + terrain: Yards(4) + ), + Play( + action: Unknown, + down: First, + terrain: GoalLine + ), + Play( + action: Unknown, + down: Second, + terrain: GoalLine + ), + Score(Touchdown), + Score(PatTouchdown), + Kickoff(Syracuse), + Penalty(Yards(15)), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(19) + ), + Play( + action: HalfbackSweep, + down: Third, + terrain: Yards(13) + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(11) + ) + ] + ), + Period( + start: Third, + end: None, + events: [ + Kickoff(Syracuse), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(11) + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Inches, + ), + Play( + action: HalfbackSweep, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: GoalLine + ), + Play( + action: Unknown, + down: Second, + terrain: GoalLine + ) + ] + ), + Period( + start: Fourth, + end: None, + events: [ + Play( + action: StrongFlood, + down: Third, + terrain: GoalLine + ), + Score(Touchdown), + Score(PatTouchdown), + Kickoff(Nebraska), + Play( + action: Curls, + down: Second, + terrain: Yards(1) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: Curls, + down: Second, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(10) + ), + Turnover(Syracuse), + Play( + action: Unknown, + down: Second, + terrain: Yards(1) + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + ] + ), + Period( + start: Overtime(1), + end: None, + events: [ + Play( + action: StrongFlood, + down: Second, + terrain: Yards(8) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None + ), + Turnover(Syracuse), + Play( + action: Unknown, // It failed so bad. + down: Second, + terrain: Yards(15) + ), + Play( + action: Unknown, // It failed so bad. + down: Third, + terrain: Yards(22) + ), + Play( + action: PlayActionBoot, + down: Fourth, + terrain: Yards(10) + ), + Score(FieldGoal) + ] + ) + ] + ), + Game( + version: "0.6.1", + flags: [Interval(3)], + periods: [ + Period( + start: First, + end: None, + events: [ + Kickoff(SouthCarolina), + Play( + action: FleaFlicker, + down: Second, + terrain: Yards(16) + ), + Play( + action: HalfbackSlipScreen, + down: Third, + terrain: Yards(13) + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(8) + ), + Play( + action: HailMary, + down: None, + terrain: None + ), + Turnover(Colorado), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None + ), + Turnover(SouthCarolina) + ] + ), + Period( + start: Second, + end: None, + events: [ + Play( + action: HalfbackSweep, + down: Second, + terrain: Yards(13) + ), + Play( + action: Mesh, + down: Third, + terrain: Yards(9) + ), + Play( + action: FleaFlicker, + down: None, + terrain: None + ), + Turnover(Colorado), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(8) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(SouthCarolina), + Play( + action: CrackStudentBodyRightTackle, + down: First, + terrain: Yards(10) + ), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(9) + ), + Play( + action: Unknown, + down: None, + terrain: None + ) + ] + ), + Period( + start: Third, + end: None, + events: [ + Kickoff(Colorado), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(4) + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(13) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ) + ] + ), + Period( + start: Fourth, + end: None, + events: [ + Play( + action: SpeedOption, + down: Second, + terrain: Yards(6) + ), + Penalty(Yards(11)), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(5) + ), + Play( + action: HalfbackSlipScreen, + down: First, + terrain: Yards(10) + ), + ] + ), + ] ) ] diff --git a/gamelog/Cargo.lock b/gamelog/Cargo.lock index 29cd030..53cf0a6 100644 --- a/gamelog/Cargo.lock +++ b/gamelog/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "gamelog" -version = "0.6.0" +version = "0.6.1" dependencies = [ "ron", "semver", diff --git a/gamelog/Cargo.toml b/gamelog/Cargo.toml index 9888864..fb27e9e 100644 --- a/gamelog/Cargo.toml +++ b/gamelog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamelog" -version = "0.6.0" +version = "0.6.1" edition = "2024" [dependencies] diff --git a/gamelog/src/action.rs b/gamelog/src/action.rs index 179e1d8..40ca054 100644 --- a/gamelog/src/action.rs +++ b/gamelog/src/action.rs @@ -5,6 +5,7 @@ pub enum Action { CrackStudentBodyRightTackle, Curls, FleaFlicker, + HailMary, HalfbackSlam, HalfbackSlipScreen, HalfbackSweep, diff --git a/gamelog/src/game.rs b/gamelog/src/game.rs index 2ed7852..50ef481 100644 --- a/gamelog/src/game.rs +++ b/gamelog/src/game.rs @@ -46,6 +46,8 @@ impl Game { let events = self .periods .iter() + // TOTALLY BORKED. + // BREAKS IF THE TEAMS ARE UNKNOWN, NEEDS FIXING. .filter_map(|period| Some(period.team_events(team.to_owned(), None).ok().unwrap())) .collect::>>() .concat(); -- 2.49.1 From 97e07e01bab5d6db240afd058dc52068935e6d87 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Thu, 10 Apr 2025 21:04:05 -0400 Subject: [PATCH 11/21] Build interface layout blocks. --- miller/Cargo.lock | 2 +- miller/src/tui.rs | 107 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 105 insertions(+), 4 deletions(-) diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 67d8745..6498b4b 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -205,7 +205,7 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "gamelog" -version = "0.6.0" +version = "0.6.1" dependencies = [ "ron", "semver", diff --git a/miller/src/tui.rs b/miller/src/tui.rs index 08326e2..72a5bb7 100644 --- a/miller/src/tui.rs +++ b/miller/src/tui.rs @@ -6,9 +6,11 @@ use ratatui::{ self, event::{KeyCode, KeyEventKind}, }, - layout::Layout, + layout::{Constraint, Layout}, style::Color as Colour, - widgets::Widget, + symbols::border, + text::Line, + widgets::{Block, Widget}, }; pub enum Event { @@ -52,12 +54,111 @@ impl App { } } +// impl on ref to avoid accidentally mutating the struct. impl Widget for &App { fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer) where Self: Sized, { - let layout: Layout; + let [teams_area, main_area, instruction_area] = + Layout::vertical([Constraint::Max(3), Constraint::Fill(1), Constraint::Max(1)]) + .areas(area); + + let [left_area, right_area] = + Layout::horizontal([Constraint::Percentage(50), Constraint::Percentage(50)]) + .areas(main_area); + + let [upper_left_area, common_play_area, common_config_area] = Layout::vertical([ + Constraint::Percentage(60), + Constraint::Percentage(20), + Constraint::Percentage(20), + ]) + .areas(left_area); + + let [quicks_area, pattern_area] = + Layout::horizontal([Constraint::Percentage(60), Constraint::Percentage(40)]) + .areas(upper_left_area); + + let [trends_area, graph_area, lower_right_area] = Layout::vertical([ + Constraint::Percentage(20), + Constraint::Percentage(55), + Constraint::Percentage(25), + ]) + .areas(right_area); + + let [legend_area, _, right_lower_right_area] = Layout::horizontal([ + Constraint::Percentage(40), + Constraint::Percentage(30), + Constraint::Percentage(30), + ]) + .areas(lower_right_area); + + let [_, compare_area] = + Layout::vertical([Constraint::Percentage(50), Constraint::Percentage(50)]) + .areas(right_lower_right_area); + + let teams_block = Block::bordered() + .title(Line::from(" Teams ")) + .border_set(border::THICK); + teams_block.render(teams_area, buf); + + let instructions = Line::from(vec![ + " ".into(), + "Quit ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + " | ".into(), + "Function ".into(), + ]); + instructions.render(instruction_area, buf); + + let quicks_block = Block::bordered() + .title(" Quicks ") + .border_set(border::THICK); + quicks_block.render(quicks_area, buf); + + let pattern_block = Block::bordered() + .title(" Pattern ") + .border_set(border::THICK); + pattern_block.render(pattern_area, buf); + + let common_play_block = Block::bordered() + .title(" Most Freq. Play ") + .border_set(border::THICK); + common_play_block.render(common_play_area, buf); + + let common_config_block = Block::bordered() + .title(" Most Freq. Configuration ") + .border_set(border::THICK); + common_config_block.render(common_config_area, buf); + + let trends_block = Block::bordered() + .title(" Trends ") + .border_set(border::THICK); + trends_block.render(trends_area, buf); + + let graph_block = Block::bordered().title(" Graph ").border_set(border::THICK); + graph_block.render(graph_area, buf); + + let legend_block = Block::bordered() + .title(" Legend ") + .border_set(border::THICK); + legend_block.render(legend_area, buf); + + let compare_block = Block::bordered() + .title(" Compare ") + .border_set(border::THICK); + compare_block.render(compare_area, buf); } } -- 2.49.1 From 6237084e64fd5f2ce02467c4c2c78ad0bcdc9fe2 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Mon, 21 Apr 2025 18:00:28 -0400 Subject: [PATCH 12/21] Update gamelog.ron --- gamelog.ron | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) diff --git a/gamelog.ron b/gamelog.ron index 4757b78..8d863bf 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1472,5 +1472,378 @@ ] ), ] + ), + Game( + version: "0.7.0", + flags: [Interval(3)], + events: [ + Quarter(1), + Kickoff(ArizonaState), + Play( + action: Unknown, + down: Second, + terrain: Yards(4), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(4), + ), + Penalty(Yards(9), + Play( + action: PlayActionComebacks, + down: Fourth, + terrain: Yards(3), + ), + Quarter(Second), + Play( + action: HailMary, + down: None, + terrain: None + ), + Turnover(Iowa), + Play( + action: Unknown, // Iform throw + down: Second, + terrain: Inches + ), + Play( + action:Unknown, + down: First + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(11) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(11) + ), + Play( + action: PlayActionBoot, + down: Fourth, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: None, + terrain: None + ), + Turnover(ArizonaState), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Quarter(Third), + Kickoff(Iowa), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: HalfbackSlipScreen, + down: First, + terrain: Yards(10), + ), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(11), + ), + Turnover(ArizonaState) + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Quarter(Fourth), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(1), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: Second, + terrain: Yards(3), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: GoalLine, + ), + Score(FieldGoal), + Kickoff(Iowa), + Play( + action: HailMary, + down: First, + terrain: Yards(10), + ) + ] + ), + Game( + version: "0.7.1", + flags: [Interval(3), SheerDumbFuckingLuck], + events: [ + Quarter(First), + Kickoff(Nebraska), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Play( + action: SlantBubble, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionPowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(5), + ), + Play( + action: HalfbackSlipScreen, + down: Third, + terrain: Yards(5), + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Penalty(Yards(15)), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(22) + ) + Play( + action: SlotOut, + down: Third, + terrain: Yards(22) + ) + Quarter(Second), + Play( + action: StrongFlood, + down: None, + terrain: None, + ), + Turnover(TexasAnM), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Curls, + down: First, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: First, + terrain: GoalLine + ) + Play( + action: Unknown, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(Nebraska), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(13), + ), + Quarter(Third), + Kickoff(TexasAnM), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(15), + ), + Play( + action: FleaFlicker, + down: Third, + terrain: Yards(15), + ), + Play( + action: StrongFlood, + down: Fourth, + terrain: Yards(19), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Turnover(Nebraska), + Play( + action: SlotOut, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: Third, + terrain: Yards(7), + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Quarter(Fourth), + Penalty(Yards(15)) + Play( + action: StrongFlood, + down: Second, + terrain: Yards(11), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Fourth, + terrain: Yards(1), + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(TexasAnM), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(Inches), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(17), + ), + Play( + action: PlayActionBoot, //Fucking bull + down: None, + terrain: None, + ), + Score(Touchdown), // Accross 75% of the field + Score(2), + Kickoff(Nebraska), + Play( + action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. + down: None, + terrain: None, + ), + ] ) ] -- 2.49.1 From d1536e2adb24fce27906ea79618477c8207e6167 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Mon, 21 Apr 2025 18:00:32 -0400 Subject: [PATCH 13/21] Create zed_settings.jsonc --- zed_settings.jsonc | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 zed_settings.jsonc diff --git a/zed_settings.jsonc b/zed_settings.jsonc new file mode 100644 index 0000000..87efb86 --- /dev/null +++ b/zed_settings.jsonc @@ -0,0 +1,52 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "telemetry": { + "diagnostics": true, + "metrics": false, + }, + "ui_font_size": 16, + "buffer_font_size": 13, + "icon_theme": "Colored Zed Icons Theme Dark", + "theme": { + "mode": "system", + "light": "One Light", + "dark": "One Dark", + }, + "restore_on_startup": "last_workspace", + "soft_wrap": "preferred_line_length", + + // Remove AI Crap + "features": { + "edit_prediction_provider": "none", + "copilot": false, + }, + "assistant": { + "version": "1", + "enabled": false, + }, + + // Language Overrides + "languages": { + "Python": { + "show_wrap_guides": true, + "preferred_line_length": 80, + }, + "Rust": { + "show_wrap_guides": true, + "preferred_line_length": 100, + }, + "JSON": { + "tab_size": 4, + }, + "JSONC": { + "tab_size": 4, + }, + }, +} -- 2.49.1 From 79923c9708e4c495fe38c878eee3e8ba2afb3044 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Tue, 22 Apr 2025 14:01:10 -0400 Subject: [PATCH 14/21] Update README.adoc --- README.adoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index 660f24a..6c8b4a0 100644 --- a/README.adoc +++ b/README.adoc @@ -14,11 +14,15 @@ I figured, that since I already had to digitize every note, that I was required * [ ] Data Visualizer? * [ ] Dynamic Web Page? -** Server Side Events? -** IDK frontend web at all. -** plotly.rs? -** charming.rs? -** WASM? +* [ ] Pattern Analysis / Play Trend Analysis +** [ ] Most Frequent Play +** [ ] Least Frequent Play +** [ ] Most Effective Play (Greatest Terrain Gain on average) +** [ ] Most frequent play set. +** [ ] Repeating play pattern. +** [ ] Slow after score. +** [ ] Bias to using Play Actions +** [ ] Bias to using Runs === Gamelog * [*] Data Format @@ -59,7 +63,3 @@ I figured, that since I already had to digitize every note, that I was required ** [*] Avg. Offence Plays per quarter ** [*] Avg. Offence Plays per game ** [*] Avg. Penalties per game -* [ ] Play Trend Analysis -** [ ] Most Frequent Play -** [ ] Least Frequent Play -** [ ] Most Effective Play (Greatest Terrain Gain given sufficient data) -- 2.49.1 From e4db3e3a2088a38dd2652a4fe30c51738f316c2a Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Tue, 22 Apr 2025 15:38:03 -0400 Subject: [PATCH 15/21] Update gamelog to v0.7.0 --- gamelog.ron | 2011 +++++++++++++++++++---------------------- gamelog/Cargo.lock | 2 +- gamelog/Cargo.toml | 2 +- gamelog/src/event.rs | 31 +- gamelog/src/game.rs | 383 ++++++-- gamelog/src/lib.rs | 2 +- gamelog/src/period.rs | 278 +----- miller/Cargo.lock | 2 +- 8 files changed, 1300 insertions(+), 1411 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index d3f5687..1bcc2af 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -4,1106 +4,1003 @@ [ Game( - version: "0.6.0", + version: "0.7.0", flags: [Interval(2), IgnoreScore], - periods: [ - Period( - start: First, - end: Second, - events: [ - Kickoff(ArizonaState), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(2), - ), - Play( - action: Unknown, // Throw Left - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Throw Right - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // PA Throw Right - down: Second, - terrain: Yards(2), - ), - Play( - action: Unknown, // PA Run Right - down: Third, - terrain: Yards(7), - ), - Play( - action: HalfbackSweep, - down: Fourth, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Turnover(TexasAnM), - Play( - action: Unknown, // PA Throw Right - down: Second, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(9), - ), - Play( - action: Unknown, // Throw Centre - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Throw Run Right - down: Second, - terrain: Yards(3), - ), - Play( - action: Unknown, // Throw that failed miserably. - down: First, - terrain: Yards(10), - ), - ] + events: [ + Quarter(First), + Kickoff(ArizonaState), + Play( + action: Unknown, + down: First, + terrain: Yards(10), ), - Period( - start: Third, - end: None, - events: [ - Kickoff(TexasAnM), - Play( - action: Unknown, // PA Comebacks or Curls? Original note: Spike Centre - down: Second, - terrain: Yards(6), - ), - Play( - action: Unknown, // Halfback? Original note: None - down: Third, - terrain: Yards(13), - ), - Play( - action: Unknown, // HB Slip Screen? Original note: Throw Right - down: First, - terrain: Yards(10), - ), - Turnover(ArizonaState), - Play( - action: SlotOut, // Slot Out or PA Comebacks. Original note: ShotgunDoubleFlex Throw - down: Second, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, // Curls or PA Comebacks. Original note: Spike Centre - down: First, - terrain: Yards(10), - ), - Turnover(TexasAnM), - Play( - action: PlayActionComebacks, // Original note: Dupe Spike Centre - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Failed Throw - down: Second, - terrain: Yards(10), - ), - Play( - action: PowerZero, // Power 0 or Crack Student Body RT. Original note: Transfer Rush Right - down: Third, - terrain: Yards(15), - ), - ] + Play( + action: Unknown, + down: Second, + terrain: Yards(2), ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: PlayActionComebacks, // Original note: Dupe Spike Centre - down: Fourth, - terrain: Yards(17), - ), - Play( - action: Unknown, // Punt - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Left - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Centre - down: First, - terrain: Yards(10), - ), - Play( - action: HalfbackSweep, // Original note: Transfer Run Left - down: Second, - terrain: Yards(12), - ), - Play( - action: Unknown, // Original note: Throw Centre - down: First, - terrain: Yards(10), - ), - Play( - action: PowerZero, // Original note: Transfer Run Right - down: Second, - terrain: Yards(8), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Kickoff(ArizonaState), - ] + Play( + action: Unknown, // Throw Left + down: First, + terrain: Yards(10), ), + Play( + action: Unknown, // Throw Right + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // PA Throw Right + down: Second, + terrain: Yards(2), + ), + Play( + action: Unknown, // PA Run Right + down: Third, + terrain: Yards(7), + ), + Quarter(Second), + Play( + action: HalfbackSweep, + down: Fourth, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Turnover(TexasAnM), + Play( + action: Unknown, // PA Throw Right + down: Second, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(9), + ), + Play( + action: Unknown, // Throw Centre + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Throw Run Right + down: Second, + terrain: Yards(3), + ), + Play( + action: Unknown, // Throw that failed miserably. + down: First, + terrain: Yards(10), + ), + Quarter(Third), + Kickoff(TexasAnM), + Play( + action: Unknown, // PA Comebacks or Curls? Original note: Spike Centre + down: Second, + terrain: Yards(6), + ), + Play( + action: Unknown, // Halfback? Original note: None + down: Third, + terrain: Yards(13), + ), + Play( + action: Unknown, // HB Slip Screen? Original note: Throw Right + down: First, + terrain: Yards(10), + ), + Turnover(ArizonaState), + Play( + action: SlotOut, // Slot Out or PA Comebacks. Original note: ShotgunDoubleFlex Throw + down: Second, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, // Curls or PA Comebacks. Original note: Spike Centre + down: First, + terrain: Yards(10), + ), + Turnover(TexasAnM), + Play( + action: PlayActionComebacks, // Original note: Dupe Spike Centre + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Failed Throw + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, // Power 0 or Crack Student Body RT. Original note: Transfer Rush Right + down: Third, + terrain: Yards(15), + ), + Quarter(Fourth), + Play( + action: PlayActionComebacks, // Original note: Dupe Spike Centre + down: Fourth, + terrain: Yards(17), + ), + Play( + action: Unknown, // Punt + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Left + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Centre + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSweep, // Original note: Transfer Run Left + down: Second, + terrain: Yards(12), + ), + Play( + action: Unknown, // Original note: Throw Centre + down: First, + terrain: Yards(10), + ), + Play( + action: PowerZero, // Original note: Transfer Run Right + down: Second, + terrain: Yards(8), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Kickoff(ArizonaState), ] ), Game( - version: "0.6.0", + version: "0.7.0", flags: [Interval(2), IgnoreScore], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(Syracuse), - Play( - action: Unknown, - down: Second, - terrain: Yards(3), - ), - Play( - action: Unknown, // Original note: Spike Centre - down: Third, - terrain: Yards(3), - ), - Play( - action: Curls, - down: Fourth, - terrain: Yards(3), - ), - Play( - action: Mesh, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(15), - ), - Play( - action: Unknown, // Original note: PA Throw Left - down: First, - terrain: Yards(10), - ), - ] + events: [ + Quarter(First), + Kickoff(Syracuse), + Play( + action: Unknown, + down: Second, + terrain: Yards(3), ), - Period( - start: Second, - end: None, - events: [ - Play( - action: Unknown, // Original note: PA Throw Centre - down: Second, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, // Original note: Transfer Rush Centre/Left - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Shotgun Throw Right - down: Second, - terrain: Yards(8), - ), - Play( - action: PlayActionPowerZero, // Original note: PA Rush Right - down: Third, - terrain: Yards(1), - ), - Play( - action: Unknown, // PowerZero or CSB RT? Original note: "HB? Rush Centre/Right" - down: Fourth, - terrain: Yards(6), - ), - Play( - action: Unknown, // HalfbackSlam? Original note: PA Rush Centre - down: None, - terrain: None, - ), - Turnover(Colorado), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, // Original note: "Transfer HB? Rush Centre" - down: Second, - terrain: Yards(9), - ), - Play( - action: Unknown, // Original note: Failed Throw - down: Third, - terrain: Yards(17), - ), - Play( - action: Unknown, // Original note: Same Failed Throw - down: Fourth, - terrain: Unknown, - ), - ] + Play( + action: Unknown, // Original note: Spike Centre + down: Third, + terrain: Yards(3), ), - Period( - start: Third, - end: None, - events: [ - Kickoff(Colorado), - Play( - action: Unknown, // Original note: Throw Right - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: ShotgunDoubleFlex Throw Right - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Pass Run Centre - down: First, - terrain: Yards(10), - ), - Play( - action: PowerZero, - down: Second, - terrain: Yards(6), - ), - ] + Play( + action: Curls, + down: Fourth, + terrain: Yards(3), ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: CrackStudentBodyRightTackle, - down: Third, - terrain: Yards(11), - ), - Play( - action: Unknown, // Original note: Spike Centre - down: Fourth, - terrain: Yards(3), - ), - Kickoff(Syracuse), - Play( - action: Unknown, // Original note: PA Throw Centre - down: First, - terrain: Yards(10), - ), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(3), - ), - ] + Play( + action: Mesh, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(15), + ), + Play( + action: Unknown, // Original note: PA Throw Left + down: First, + terrain: Yards(10), + ), + Quarter(Second), + Play( + action: Unknown, // Original note: PA Throw Centre + down: Second, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, // Original note: Transfer Rush Centre/Left + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Shotgun Throw Right + down: Second, + terrain: Yards(8), + ), + Play( + action: PlayActionPowerZero, // Original note: PA Rush Right + down: Third, + terrain: Yards(1), + ), + Play( + action: Unknown, // PowerZero or CSB RT? Original note: "HB? Rush Centre/Right" + down: Fourth, + terrain: Yards(6), + ), + Play( + action: Unknown, // HalfbackSlam? Original note: PA Rush Centre + down: None, + terrain: None, + ), + Turnover(Colorado), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, // Original note: "Transfer HB? Rush Centre" + down: Second, + terrain: Yards(9), + ), + Play( + action: Unknown, // Original note: Failed Throw + down: Third, + terrain: Yards(17), + ), + Play( + action: Unknown, // Original note: Same Failed Throw + down: Fourth, + terrain: Unknown, + ), + Quarter(Third), + Kickoff(Colorado), + Play( + action: Unknown, // Original note: Throw Right + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: ShotgunDoubleFlex Throw Right + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Pass Run Centre + down: First, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: Second, + terrain: Yards(6), + ), + Quarter(Fourth), + Play( + action: CrackStudentBodyRightTackle, + down: Third, + terrain: Yards(11), + ), + Play( + action: Unknown, // Original note: Spike Centre + down: Fourth, + terrain: Yards(3), + ), + Kickoff(Syracuse), + Play( + action: Unknown, // Original note: PA Throw Centre + down: First, + terrain: Yards(10), + ), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(3), ), ] ), Game( - version: "0.6.0", + version: "0.7.0", flags: [Interval(2)], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(Nebraska), - Play( - action: Curls, - down: First, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(7), - ), - Play( - action: Curls, - down: Third, - terrain: Yards(9), - ), - Play( - action: CrackStudentBodyRightTackle, - down: Fourth, - terrain: Yards(9), - ), - Play( - action: FleaFlicker, - down: None, - terrain: None, - ), - Turnover(SouthCarolina), - Play( - action: Unknown, // Original note: Throw Right Dash - down: First, - terrain: Yards(10), - ), - ] + events: [ + Quarter(First), + Kickoff(Nebraska), + Play( + action: Curls, + down: First, + terrain: Yards(10) ), - Period( - start: Second, - end: None, - events: [ - Play( - action: Unknown, // Original note: Throw Centre - down: First, - terrain: GoalLine, - ), - Score(Touchdown), - Score(PatFail), - Kickoff(Nebraska), - Play( - action: StrongFlood, - down: First, - terrain: Yards(10), - ), - Play( - action: HalfbackSweep, - down: Second, - terrain: Yards(15), - ), - Play( - action: SlantBubble, - down: Third, - terrain: Yards(4), - ), - Play( - action: Unknown, // Original note: Halfback Slant Dummy - down: Fourth, - terrain: Yards(6), - ), - Play( - action: SlantBubble, - down: None, - terrain: None, - ), - Turnover(SouthCarolina), - Play( - action: Unknown, - down: First, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(10) - ), - ] + Play( + action: Unknown, + down: Second, + terrain: Yards(7), ), - Period( - start: Third, - end: None, - events: [ - Kickoff(SouthCarolina), - Play( - action: Unknown, - down: Second, - terrain: Yards(18), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(14), - ), - Play( - action: Unknown, // Original note: Spike Centre - down: Fourth, - terrain: Yards(16), - ), - Turnover(Nebraska), - Play( - action: Unknown, // Original note: Fake Field Goal 44yrds - down: None, - terrain: None, - ), - Score(FieldGoal), - Kickoff(SouthCarolina), - Play( - action: Unknown, - down: Second, - terrain: Yards(3), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(3), - ), - ] + Play( + action: Curls, + down: Third, + terrain: Yards(9), ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: Unknown, // Original note: Throw Centre - down: Fourth, - terrain: Yards(3), - ), - Play( - action: Unknown, // Original note: Throw, Run Left - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Left - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(5), - ), - Score(Touchdown), - Score(PatFail), - Kickoff(Nebraska), - Play( - action: PowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: StrongFlood, - down: First, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Punt - down: First, - terrain: Yards(10), - ), - Turnover(SouthCarolina), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(6), - ), - Turnover(Nebraska), - // Field Goal 41 yrds - Score(FieldGoal), - Kickoff(SouthCarolina), - Play( - action: Unknown, - down: Second, - terrain: Yards(18), - ) - ] + Play( + action: CrackStudentBodyRightTackle, + down: Fourth, + terrain: Yards(9), + ), + Play( + action: FleaFlicker, + down: None, + terrain: None, + ), + Turnover(SouthCarolina), + Play( + action: Unknown, // Original note: Throw Right Dash + down: First, + terrain: Yards(10), + ), + Quarter(Second), + Play( + action: Unknown, // Original note: Throw Centre + down: First, + terrain: GoalLine, + ), + Score(Touchdown), + Score(PatFail), + Kickoff(Nebraska), + Play( + action: StrongFlood, + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSweep, + down: Second, + terrain: Yards(15), + ), + Play( + action: SlantBubble, + down: Third, + terrain: Yards(4), + ), + Play( + action: Unknown, // Original note: Halfback Slant Dummy + down: Fourth, + terrain: Yards(6), + ), + Play( + action: SlantBubble, + down: None, + terrain: None, + ), + Turnover(SouthCarolina), + Play( + action: Unknown, + down: First, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(10) + ), + Quarter(Third), + Kickoff(SouthCarolina), + Play( + action: Unknown, + down: Second, + terrain: Yards(18), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(14), + ), + Play( + action: Unknown, // Original note: Spike Centre + down: Fourth, + terrain: Yards(16), + ), + Turnover(Nebraska), + Play( + action: Unknown, // Original note: Fake Field Goal 44yrds + down: None, + terrain: None, + ), + Score(FieldGoal), + Kickoff(SouthCarolina), + Play( + action: Unknown, + down: Second, + terrain: Yards(3), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(3), + ), + Quarter(Fourth), + Play( + action: Unknown, // Original note: Throw Centre + down: Fourth, + terrain: Yards(3), + ), + Play( + action: Unknown, // Original note: Throw, Run Left + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Left + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(5), + ), + Score(Touchdown), + Score(PatFail), + Kickoff(Nebraska), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: StrongFlood, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Punt + down: First, + terrain: Yards(10), + ), + Turnover(SouthCarolina), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(6), + ), + Turnover(Nebraska), + // Field Goal 41 yrds + Score(FieldGoal), + Kickoff(SouthCarolina), + Play( + action: Unknown, + down: Second, + terrain: Yards(18), ), ] ), Game( - version: "0.6.0", + version: "0.7.0", flags: [Interval(2)], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(Colorado), - Play( - action: Unknown, - down: Second, - terrain: Yards(3), - ), - Play( - action: Unknown, // Original note: Pass, Dash Centre - down: Third, - terrain: Yards(3), - ), - Play( - action: Unknown, // Original note: Throw, Dash Right - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Dash Centre - down: Second, - terrain: Yards(12), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - ] + events: [ + Quarter(First), + Kickoff(Colorado), + Play( + action: Unknown, + down: Second, + terrain: Yards(3), ), - Period( - start: Second, - end: None, - events: [ - Play( - action: Unknown, // Original note: Pass Back, Dash - down: Second, - terrain: Yards(15), - ), - Play( // Golden Play - action: Unknown, // Original note: Throw, Dash Right - down: Third, - terrain: Yards(2), - ), - Play( - action: Unknown, // Original note: Same as last. - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Pass Back, Dash Right - down: Second, - terrain: Yards(7), - ), - Play( - action: Unknown, // Original note: Throw Right; Went Out - down: Third, - terrain: Yards(7), - ), - Play( - action: Unknown, // HB? Original note: Walk Back Throw Centre, - down: First, - terrain: GoalLine, - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(Iowa), - Penalty(Yards(15)), - Play( - action: Unknown, // Original note: PA Throw Right and Dash - down: Second, - terrain: Yards(6), - ), - Play( - action: Unknown, // Original note: Throw Right - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(1), - ), - Play( - action: Unknown, // Original note: Spike Left - down: Third, - terrain: Yards(1), - ), - Play( - action: Unknown, // Original note: PA Throw Right and Dash - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Right - down: First, - terrain: GoalLine, - ), - Score(FieldGoal), - ] + Play( + action: Unknown, // Original note: Pass, Dash Centre + down: Third, + terrain: Yards(3), ), - Period( - start: Third, - end: None, - events: [ - Kickoff(Iowa), - Play( - action: Unknown, // HB? Original note: Run Back, Throw Centre, Run Centre - down: Second, - terrain: Yards(4), - ), - Play( - action: Unknown, // PA? Original note: Dupe, Throw Right - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Orignal note: Run Left - down: Second, - terrain: Yards(13), - ), - Play( - action: Unknown, // PA? Original note: Dupe, Throw Centre, Run Centre - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, // Orignal note: Throw Right - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Left - down: Third, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Dupe, Throw Centre, Run Centre - down: First, - terrain: Yards(10), - ), - ] + Play( + action: Unknown, // Original note: Throw, Dash Right + down: First, + terrain: Yards(10), ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: Unknown, // Original note: Throw Left, Run Left - down: Second, - terrain: Yards(8), - ), - Play( - action: Unknown, // Original note: Dupe, Throw Centre, Run Centre - down: Third, - terrain: Yards(4), - ), - // Touchdown - Score(Touchdown), - Score(PatSafety), - Kickoff(Colorado), - Play( - action: Unknown, // Original note: Dupe, Throw Left - down: Second, - terrain: Yards(10), - ), - Play( - action: Unknown, // Original note: Throw Centre, Run Centre - down: Third, - terrain: Yards(1), - ), - Play( - action: Unknown, // Original note: Run Left - down: Fourth, - terrain: Yards(4) - ), - Play( - action: Unknown, // Original note: Dupe, Run Right, - down: None, - terrain: None, - ), - Turnover(Iowa), - Penalty(Yards(15)), - Play( - action: Unknown, // Original note: Run Left - down: Second, - terrain: Yards(11), - ), - Play( - action: Unknown, // Original note: Pass Back, Run Left - down: Third, - terrain: Yards(15), - ), - //Field Goal - Score(FieldGoal) - ] - ) + Play( + action: Unknown, // Original note: Dash Centre + down: Second, + terrain: Yards(12), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Quarter(Second), + Play( + action: Unknown, // Original note: Pass Back, Dash + down: Second, + terrain: Yards(15), + ), + Play( // Golden Play + action: Unknown, // Original note: Throw, Dash Right + down: Third, + terrain: Yards(2), + ), + Play( + action: Unknown, // Original note: Same as last. + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Pass Back, Dash Right + down: Second, + terrain: Yards(7), + ), + Play( + action: Unknown, // Original note: Throw Right; Went Out + down: Third, + terrain: Yards(7), + ), + Play( + action: Unknown, // HB? Original note: Walk Back Throw Centre, + down: First, + terrain: GoalLine, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(Iowa), + Penalty(Yards(15)), + Play( + action: Unknown, // Original note: PA Throw Right and Dash + down: Second, + terrain: Yards(6), + ), + Play( + action: Unknown, // Original note: Throw Right + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, // Original note: Spike Left + down: Third, + terrain: Yards(1), + ), + Play( + action: Unknown, // Original note: PA Throw Right and Dash + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Right + down: First, + terrain: GoalLine, + ), + Score(FieldGoal), + Quarter(Third), + Kickoff(Iowa), + Play( + action: Unknown, // HB? Original note: Run Back, Throw Centre, Run Centre + down: Second, + terrain: Yards(4), + ), + Play( + action: Unknown, // PA? Original note: Dupe, Throw Right + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Orignal note: Run Left + down: Second, + terrain: Yards(13), + ), + Play( + action: Unknown, // PA? Original note: Dupe, Throw Centre, Run Centre + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, // Orignal note: Throw Right + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Left + down: Third, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Dupe, Throw Centre, Run Centre + down: First, + terrain: Yards(10), + ), + Quarter(Fourth), + Play( + action: Unknown, // Original note: Throw Left, Run Left + down: Second, + terrain: Yards(8), + ), + Play( + action: Unknown, // Original note: Dupe, Throw Centre, Run Centre + down: Third, + terrain: Yards(4), + ), + // Touchdown + Score(Touchdown), + Score(PatSafety), + Kickoff(Colorado), + Play( + action: Unknown, // Original note: Dupe, Throw Left + down: Second, + terrain: Yards(10), + ), + Play( + action: Unknown, // Original note: Throw Centre, Run Centre + down: Third, + terrain: Yards(1), + ), + Play( + action: Unknown, // Original note: Run Left + down: Fourth, + terrain: Yards(4) + ), + Play( + action: Unknown, // Original note: Dupe, Run Right, + down: None, + terrain: None, + ), + Turnover(Iowa), + Penalty(Yards(15)), + Play( + action: Unknown, // Original note: Run Left + down: Second, + terrain: Yards(11), + ), + Play( + action: Unknown, // Original note: Pass Back, Run Left + down: Third, + terrain: Yards(15), + ), + Score(FieldGoal) ] ), Game( - version: "0.6.0", + version: "0.7.0", flags: [Interval(2)], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(Nebraska), - Play( - action: CrackStudentBodyRightTackle, - down:Second, - terrain:Yards(13) - ), - Play( - action:Mesh, - down:Third, - terrain:Yards(14) - ), - Play( - action:StrongFlood, - down:Fourth, - terrain:Yards(14) - ), - Play( - action: PlayActionComebacks, - down:First, - terrain:Yards(10) - ), - Play( - action:SlotOut, - down:Second, - terrain:Yards(1) - ) - ] + events: [ + Quarter(First), + Kickoff(Nebraska), + Play( + action: CrackStudentBodyRightTackle, + down:Second, + terrain:Yards(13) ), - Period( - start:Second, - end:None, - events:[ - Play( - action:PlayActionComebacks, - down: First, - terrain:Yards(10) - ), - Play( - action:SpeedOption, - down:Second, - terrain:Yards(7) - ), - Play( - action:SlotOut, - down:First, - terrain:Yards(10) - ), - Play( - action:PlayActionComebacks, - down:First, - terrain:Yards(10) - ), - Play( - action:StrongFlood, - down:First, - terrain:GoalLine - ), - Play( - action:StrongFlood, - down:Second, - terrain:GoalLine - ), - Play( - action:HalfbackSlipScreen, - down:Third, - terrain: GoalLine - ), - Play( - action:PlayActionComebacks, - down:None, - terrain:None, - ), - Score(Touchdown), - Score(PatFail), - Kickoff(Iowa), - Play( - action: Unknown, - down:Second, - terrain:Yards(10) - ), - Play( - action: Unknown, - down:Third, - terrain:Yards(10) - ), - Play( - action: Unknown, //Shotgun double flex Shoot Centre - down:Fourth, - terrain:Yards(10) - ), - Turnover(Nebraska), - Play( - action:SlantBubble, - down: First, - terrain: GoalLine, - ) - ] + Play( + action:Mesh, + down:Third, + terrain:Yards(14) ), - Period( - start:Third, - end: Fourth, - events: [ - Kickoff(Iowa), - Play( - action:Unknown, - down: Second, - terrain:Yards(4) - ), - Play( - action:Unknown, //PA? - down: First, - terrain:Yards(10), - ), - Play( - action: Unknown,//IForm Normal, Thrown - down: None, - terrain: None - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(Nebraska), - Play( - action: PlayActionBoot, - down: First, - terrain: Yards(10) - ), - Play( - action: SlantBubble, - down: First, - terrain: Yards(10) - ), - Play( - action: FleaFlicker, - down: Second, - terrain: Yards(10) - ), - Play( - action:PlayActionComebacks, - down: Third, - terrain: Yards(10) - ), - Play( - action: SlotOut, - down: First, - terrain: GoalLine - ), - Play( - action: HalfbackSlipScreen, - down: Second, - terrain: GoalLine, - ), - Play( - action: SpeedOption, - down: Third, - terrain: GoalLine, - ), - Play( - action: StrongFlood, - down: Fourth, - terrain: GoalLine - ), - Play( - action: Curls, - down: None, - terrain: None - ), - Turnover(Iowa), - Play( - action: Unknown, - down: Second, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(10) - ), - Play( - action: Unknown,// Run - down: Fourth, - terrain: Yards(7) - ), - Play( - action:Unknown, - down: First, - terrain: Yards(10) - ), - Turnover(Nebraska), - Play( - action:SlantBubble, - down: Second, - terrain: Yards(2) - ), - Play( - action: PlayActionPowerZero, - down: Third, - terrain: Yards(2) - ), - Play( - action: CrackStudentBodyRightTackle, - down: First, - terrain: Yards(10) - ), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: None, - terrain: None - ) - ] + Play( + action:StrongFlood, + down:Fourth, + terrain:Yards(14) + ), + Play( + action: PlayActionComebacks, + down:First, + terrain:Yards(10) + ), + Play( + action:SlotOut, + down:Second, + terrain:Yards(1) + ), + Quarter(Second), + Play( + action:PlayActionComebacks, + down: First, + terrain:Yards(10) + ), + Play( + action:SpeedOption, + down:Second, + terrain:Yards(7) + ), + Play( + action:SlotOut, + down:First, + terrain:Yards(10) + ), + Play( + action:PlayActionComebacks, + down:First, + terrain:Yards(10) + ), + Play( + action:StrongFlood, + down:First, + terrain:GoalLine + ), + Play( + action:StrongFlood, + down:Second, + terrain:GoalLine + ), + Play( + action:HalfbackSlipScreen, + down:Third, + terrain: GoalLine + ), + Play( + action:PlayActionComebacks, + down:None, + terrain:None, + ), + Score(Touchdown), + Score(PatFail), + Kickoff(Iowa), + Play( + action: Unknown, + down:Second, + terrain:Yards(10) + ), + Play( + action: Unknown, + down:Third, + terrain:Yards(10) + ), + Play( + action: Unknown, //Shotgun double flex Shoot Centre + down:Fourth, + terrain:Yards(10) + ), + Turnover(Nebraska), + Play( + action:SlantBubble, + down: First, + terrain: GoalLine, + ), + Quarter(Third), + Kickoff(Iowa), + Play( + action:Unknown, + down: Second, + terrain:Yards(4) + ), + Play( + action:Unknown, //PA? + down: First, + terrain:Yards(10), + ), + Play( + action: Unknown,//IForm Normal, Thrown + down: None, + terrain: None + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(Nebraska), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10) + ), + Play( + action: SlantBubble, + down: First, + terrain: Yards(10) + ), + Play( + action: FleaFlicker, + down: Second, + terrain: Yards(10) + ), + Play( + action:PlayActionComebacks, + down: Third, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: First, + terrain: GoalLine + ), + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: GoalLine, + ), + Quarter(Fourth), + Play( + action: SpeedOption, + down: Third, + terrain: GoalLine, + ), + Play( + action: StrongFlood, + down: Fourth, + terrain: GoalLine + ), + Play( + action: Curls, + down: None, + terrain: None + ), + Turnover(Iowa), + Play( + action: Unknown, + down: Second, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(10) + ), + Play( + action: Unknown,// Run + down: Fourth, + terrain: Yards(7) + ), + Play( + action:Unknown, + down: First, + terrain: Yards(10) + ), + Turnover(Nebraska), + Play( + action:SlantBubble, + down: Second, + terrain: Yards(2) + ), + Play( + action: PlayActionPowerZero, + down: Third, + terrain: Yards(2) + ), + Play( + action: CrackStudentBodyRightTackle, + down: First, + terrain: Yards(10) + ), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None ) ] ), Game( // TexasAnM were opponents, but not recorded as // they were not present; Miller played in place. - version: "0.6.0", + version: "0.7.0", flags: [Interval(2), IgnoreTeam(TexasAnM)], - periods: [ - Period( - start: First, - end: None, - events: [ - Turnover(SouthCarolina), - Play( - action: FleaFlicker, - down: None, - terrain: None - ), - Turnover(TexasAnM) - ] + events: [ + Quarter(First), + Turnover(SouthCarolina), + Play( + action: FleaFlicker, + down: None, + terrain: None ), - Period( - start: Second, - end: None, - events:[ - Turnover(SouthCarolina), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(9) - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Turnover(TexasAnM), - Score(FieldGoal) - ] + Turnover(TexasAnM), + Quarter(Second), + Turnover(SouthCarolina), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(9) ), - Period( - start: Third, - end: Fourth, - events: [ - Kickoff(SouthCarolina), - Play( - action: Unknown, // Rush - down: Second, - terrain: Yards(7) - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(16) - ), - Play( - action: HalfbackSweep, - down: Fourth, - terrain: Yards(17) - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Turnover(TexasAnM), - Score(Touchdown), - Score(PatSafety), - Kickoff(SouthCarolina), - Play( - action: HalfbackSweep, - down: Second, - terrain: Yards(13) - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10) - ), - Play( - action: Unknown,//DoubleFlex Throw - down: Second, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(10) - ), - Play( - action: Unknown, // Rush - down: None, - terrain: None - ), - Turnover(TexasAnM), - Score(Touchdown), - Score(PatSafety), - Kickoff(SouthCarolina), - Play( - action: Unknown, - down: Second, - terrain: Yards(13) - ), - Play( - action: HalfbackSweep, - down: None, - terrain: None, - ) - //Texas 17, SouthCarolina 0 - ] + Play( + action: Unknown, + down: None, + terrain: None, + ), + Turnover(TexasAnM), + Score(FieldGoal), + Quarter(Third), + Kickoff(SouthCarolina), + Play( + action: Unknown, // Rush + down: Second, + terrain: Yards(7) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(16) + ), + Play( + action: HalfbackSweep, + down: Fourth, + terrain: Yards(17) + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Turnover(TexasAnM), + Score(Touchdown), + Score(PatSafety), + Kickoff(SouthCarolina), + Play( + action: HalfbackSweep, + down: Second, + terrain: Yards(13) + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10) + ), + Quarter(Fourth), + Play( + action: Unknown,//DoubleFlex Throw + down: Second, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(10) + ), + Play( + action: Unknown, // Rush + down: None, + terrain: None + ), + Turnover(TexasAnM), + Score(Touchdown), + Score(PatSafety), + Kickoff(SouthCarolina), + Play( + action: Unknown, + down: Second, + terrain: Yards(13) + ), + Play( + action: HalfbackSweep, + down: None, + terrain: None, ) + //Texas 17, SouthCarolina 0 ] ) ] diff --git a/gamelog/Cargo.lock b/gamelog/Cargo.lock index 29cd030..e542113 100644 --- a/gamelog/Cargo.lock +++ b/gamelog/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "gamelog" -version = "0.6.0" +version = "0.7.0" dependencies = [ "ron", "semver", diff --git a/gamelog/Cargo.toml b/gamelog/Cargo.toml index 9888864..c014abc 100644 --- a/gamelog/Cargo.toml +++ b/gamelog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamelog" -version = "0.6.0" +version = "0.7.0" edition = "2024" [dependencies] diff --git a/gamelog/src/event.rs b/gamelog/src/event.rs index c483a4e..f53f9be 100644 --- a/gamelog/src/event.rs +++ b/gamelog/src/event.rs @@ -1,4 +1,4 @@ -use crate::{Down, Play, TerrainState, error}; +use crate::{Down, Play, Quarter, TerrainState, error}; use serde::Deserialize; type Offence = Team; @@ -10,6 +10,7 @@ pub enum Event { Turnover(Offence), Penalty(TerrainState), Score(ScorePoints), + Quarter(Quarter), } impl Event { @@ -74,6 +75,14 @@ impl Event { _ => Err(error::NoTeamAttribute), } } + + pub fn quarter(&self) -> Option { + if let Event::Quarter(quarter) = self { + Some(quarter.to_owned()) + } else { + None + } + } } #[derive(Debug, Deserialize, Clone, PartialEq)] @@ -171,6 +180,20 @@ mod tests { terrain: Some(TerrainState::Inches), }); + let quarter = Event::Quarter(Quarter::First); + + assert!(None == quarter.delta(&kickoff)); + assert!(None == quarter.delta(&first_down)); + assert!(None == quarter.delta(&second_down)); + assert!(None == quarter.delta(&third_down)); + assert!(None == quarter.delta(&fourth_down)); + assert!(None == quarter.delta(&turnover)); + assert!(None == quarter.delta(&penalty)); + assert!(None == quarter.delta(&goal_line)); + assert!(None == quarter.delta(&inches)); + assert!(None == quarter.delta(&score)); + assert!(None == quarter.delta(&quarter)); + assert!(10_i8 == kickoff.delta(&first_down).unwrap()); assert!(0_i8 == kickoff.delta(&second_down).unwrap()); assert!(None == kickoff.delta(&penalty)); @@ -248,9 +271,9 @@ mod tests { assert!(None == inches.delta(&kickoff)); assert!(None == inches.delta(&first_down)); - assert!(-10_i8 == goal_line.delta(&second_down).unwrap()); - assert!(-13_i8 == goal_line.delta(&third_down).unwrap()); - assert!(-5_i8 == goal_line.delta(&fourth_down).unwrap()); + assert!(-10_i8 == inches.delta(&second_down).unwrap()); + assert!(-13_i8 == inches.delta(&third_down).unwrap()); + assert!(-5_i8 == inches.delta(&fourth_down).unwrap()); assert!(None == inches.delta(&turnover)); assert!(None == inches.delta(&penalty)); assert!(None == inches.delta(&goal_line)); diff --git a/gamelog/src/game.rs b/gamelog/src/game.rs index 2ed7852..926d9ce 100644 --- a/gamelog/src/game.rs +++ b/gamelog/src/game.rs @@ -1,11 +1,12 @@ -use crate::{Event, Period, Team, error}; +use crate::{Event, Quarter, Team, error}; use serde::Deserialize; +use strum::IntoEnumIterator; #[derive(Debug, Deserialize, Clone)] pub struct Game { pub version: semver::Version, pub flags: Vec, - pub periods: Vec, + pub events: Vec, } impl Game { @@ -25,12 +26,10 @@ impl Game { let mut teams = vec![]; - self.periods.iter().for_each(|period| { - for event in period.events.iter() { - if let Ok(team) = event.team() { - if !ignore.contains(&team) && !teams.contains(&team) { - teams.push(team) - } + self.events.iter().for_each(|event| { + if let Ok(team) = event.team() { + if !ignore.contains(&team) && !teams.contains(&team) { + teams.push(team) } } }); @@ -43,12 +42,17 @@ impl Game { } pub fn deltas(&self, team: Team) -> Vec { - let events = self - .periods + let events: Vec = self + .team_events(team) .iter() - .filter_map(|period| Some(period.team_events(team.to_owned(), None).ok().unwrap())) - .collect::>>() - .concat(); + .filter_map(|event| { + if let Event::Quarter(_) = event { + None + } else { + Some(event.to_owned()) + } + }) + .collect(); let len = events.len() - 1; let mut idx: usize = 0; let mut deltas: Vec = vec![]; @@ -65,33 +69,30 @@ impl Game { } pub fn team_plays(&self, team: Team) -> usize { - self.periods + self.team_events(team) .iter() - .filter_map(|period| { - if !period.is_overtime() { - let plays = period.team_plays(team.to_owned(), None); - Some(plays.unwrap().len()) + .filter_map(|event| { + if let Event::Play(_) = event { + Some(event) } else { None } }) - .collect::>() - .iter() - .sum::() + .collect::>() + .len() } /// The average number of plays in a quarter. - /// Does not include OT plays or quarters where team indeterminate. pub fn avg_plays_per_quarter(&self, team: Team) -> f32 { - // Handle if teams known at start or not override via index calculation of all game events. + let periods: Vec = Quarter::iter() + .filter_map(|quarter| Some(self.to_owned().get_period(quarter.to_owned())).to_owned()) + .collect(); - let quarterly_avgs: Vec = self - .periods + let quarterly_avgs: Vec = periods .iter() .filter_map(|period| { if !period.is_overtime() { - let plays = period.team_plays(team.to_owned(), None); - Some(plays.unwrap().len() as f32 / period.quarters().len() as f32) + Some(period.team_plays(team.to_owned()) as f32) } else { None } @@ -142,29 +143,138 @@ impl Game { } pub fn penalties(&self, team: Team) -> usize { - // Knock down nesting? - self.periods + self.team_events(team) .iter() - .filter_map(|period| { - Some( - period - .team_events(team.to_owned(), None) - .ok()? - .iter() - .filter_map(|event| { - if let Event::Penalty(_) = event { - Some(event.to_owned()) - } else { - None - } - }) - .collect::>(), - ) + .filter_map(|event| { + if let Event::Penalty(_) = event { + Some(event.to_owned()) + } else { + None + } }) - .collect::>>() - .concat() + .collect::>() .len() } + + pub fn get_period(&self, quarter: Quarter) -> Period { + let mut record = false; + + Period { + period: quarter.to_owned(), + events: self + .events + .iter() + .filter_map(|event| { + if let Event::Quarter(_) = event { + record = Event::Quarter(quarter.to_owned()) == *event; + } + + if record { + return Some(event.to_owned()); + } + + None + }) + .collect::>(), + } + } + + pub fn team_events(&self, team: Team) -> Vec { + let mut events: Vec = vec![]; + let mut first = true; + let mut record: bool = true; + + self.events.iter().for_each(|event| { + if let Event::Kickoff(_) | Event::Turnover(_) = event { + record = { + if team == event.team().unwrap() { + // Wipe events vec if the start of quarter was opposition + // on offence. + if first { + events = vec![]; + } + + true + } else { + events.push(event.to_owned()); + false + } + }; + + first = false; + } + + if record { + events.push(event.to_owned()); + } + }); + + // If already handled or assumption override applicable + events + } +} + +#[derive(Debug, Clone)] +pub struct Period { + period: Quarter, + events: Vec, +} + +impl Period { + pub fn team_events(&self, team: Team) -> Vec { + let mut events: Vec = vec![]; + let mut first = true; + let mut record: bool = true; + + self.events.iter().for_each(|event| { + if let Event::Kickoff(_) | Event::Turnover(_) = event { + record = { + if team == event.team().unwrap() { + // Wipe events vec if the start of quarter was opposition + // on offence. + if first { + events = vec![]; + } + + true + } else { + events.push(event.to_owned()); + false + } + }; + + first = false; + } + + if record { + events.push(event.to_owned()); + } + }); + + events + } + + pub fn team_plays(&self, team: Team) -> usize { + self.team_events(team) + .iter() + .filter_map(|event| { + if let Event::Play(_) = event { + Some(event) + } else { + None + } + }) + .collect::>() + .len() + } + + pub fn is_overtime(&self) -> bool { + if let Quarter::Overtime(_) = self.period { + true + } else { + false + } + } } #[derive(Debug, Deserialize, Clone, PartialEq)] @@ -175,6 +285,7 @@ pub enum Flags { Interval(u8), } +/* #[cfg(test)] mod tests { use crate::*; @@ -184,30 +295,20 @@ mod tests { let a = Game { version: crate::MIN_VER, flags: vec![], - periods: vec![ - Period { - start: Quarter::First, - end: None, - events: vec![ - Event::Kickoff(Team::Nebraska), - Event::Play(Play::default()), - Event::Turnover(Team::ArizonaState), - ], - }, - Period { - start: Quarter::Second, - end: Some(Quarter::Fourth), - events: vec![ - Event::Turnover(Team::Nebraska), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Turnover(Team::ArizonaState), - ], - }, + events: vec![ + Event::Quarter(Quarter::First), + Event::Kickoff(Team::Nebraska), + Event::Play(Play::default()), + Event::Turnover(Team::ArizonaState), + Event::Quarter(Quarter::Second), + Event::Turnover(Team::Nebraska), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Turnover(Team::ArizonaState), ], }; @@ -409,4 +510,146 @@ mod tests { 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]); } + + #[test] + fn team_events() { + let a = Period { + start: Quarter::First, + end: None, + events: vec![ + Event::Kickoff(Team::Nebraska), + Event::Play(Play::default()), + Event::Turnover(Team::ArizonaState), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Kickoff(Team::Nebraska), + Event::Score(ScorePoints::Touchdown), + Event::Kickoff(Team::SouthCarolina), + ], + }; + + let b = Period { + start: Quarter::Second, + end: None, + events: vec![ + Event::Play(Play::default()), + Event::Turnover(Team::SouthCarolina), + ], + }; + + let c = Period { + start: Quarter::Second, + end: None, + events: vec![ + Event::Play(Play::default()), + Event::Turnover(Team::Nebraska), + ], + }; + + let d = Period { + start: Quarter::Second, + end: None, + events: vec![Event::Play(Play::default())], + }; + + assert!( + a.team_events(Team::Nebraska, None).unwrap() + == vec![ + Event::Kickoff(Team::Nebraska), + Event::Play(Play::default()), + Event::Turnover(Team::ArizonaState), + Event::Kickoff(Team::Nebraska), + Event::Score(ScorePoints::Touchdown), + Event::Kickoff(Team::SouthCarolina), + ] + ); + assert!( + b.team_events(Team::Nebraska, None).unwrap() + == vec![ + Event::Play(Play::default()), + Event::Turnover(Team::SouthCarolina) + ] + ); + assert!( + c.team_events(Team::Nebraska, None).unwrap() == vec![Event::Turnover(Team::Nebraska)] + ); + assert!(true == d.team_events(Team::Nebraska, None).is_err()); + assert!(false == d.team_events(Team::Nebraska, Some(true)).is_err()) + } + + #[test] + fn team_plays() { + let period = Period { + start: Quarter::First, + end: None, + events: vec![ + Event::Kickoff(Team::Nebraska), + Event::Play(Play::default()), + Event::Turnover(Team::ArizonaState), + Event::Play(Play::default()), + Event::Play(Play::default()), + Event::Kickoff(Team::Nebraska), + Event::Play(Play::default()), + Event::Score(ScorePoints::default()), + Event::Kickoff(Team::SouthCarolina), + Event::Play(Play::default()), + Event::Turnover(Team::Nebraska), + Event::Play(Play::default()), + ], + }; + + assert!( + period.team_plays(Team::Nebraska, None).unwrap() + == vec![Play::default(), Play::default(), Play::default()] + ); + } + + #[test] + fn quarters() { + let first = Period { + start: Quarter::First, + end: None, + events: vec![], + }; + + let second_fourth = Period { + start: Quarter::Second, + end: Some(Quarter::Fourth), + events: vec![], + }; + + let third_ot_three = Period { + start: Quarter::Third, + end: Some(Quarter::Overtime(3)), + events: vec![], + }; + + let ot_one_three = Period { + start: Quarter::Overtime(1), + end: Some(Quarter::Overtime(3)), + events: vec![], + }; + + assert!(first.quarters() == vec![Quarter::First]); + assert!(second_fourth.quarters() == vec![Quarter::Second, Quarter::Third, Quarter::Fourth]); + assert!( + third_ot_three.quarters() + == vec![ + Quarter::Third, + Quarter::Fourth, + Quarter::Overtime(1), + Quarter::Overtime(2), + Quarter::Overtime(3) + ] + ); + assert!( + ot_one_three.quarters() + == vec![ + Quarter::Overtime(1), + Quarter::Overtime(2), + Quarter::Overtime(3) + ] + ) + } } +*/ diff --git a/gamelog/src/lib.rs b/gamelog/src/lib.rs index 9ed9250..0878caf 100644 --- a/gamelog/src/lib.rs +++ b/gamelog/src/lib.rs @@ -9,7 +9,7 @@ mod play; mod terrain; #[allow(unused)] -pub const MIN_VER: semver::Version = semver::Version::new(0, 6, 0); +pub const MIN_VER: semver::Version = semver::Version::new(0, 7, 0); // I'm lazy. pub use action::*; diff --git a/gamelog/src/period.rs b/gamelog/src/period.rs index 3932d23..90335ec 100644 --- a/gamelog/src/period.rs +++ b/gamelog/src/period.rs @@ -1,125 +1,7 @@ -use crate::{Event, Play, Team, error}; use serde::Deserialize; +use strum::EnumIter; -#[derive(Debug, Deserialize, Clone)] -pub struct Period { - pub start: Quarter, - pub end: Option, - pub events: Vec, -} - -impl Period { - pub fn team_events( - &self, - team: Team, - assume_team_known: Option, - ) -> Result, error::CannotDetermineTeams> { - let mut events: Vec = vec![]; - let mut first = true; - let mut record: bool = true; - let assume_team_known = assume_team_known.unwrap_or(false); - - self.events.iter().for_each(|event| { - if let Event::Kickoff(_) | Event::Turnover(_) = event { - record = { - if team == event.team().unwrap() { - // Wipe events vec if the start of quarter was opposition - // on offence. - if first { - events = vec![]; - } - - true - } else { - events.push(event.to_owned()); - false - } - }; - - first = false; - } - - if record { - events.push(event.to_owned()); - } - }); - - // If already handled or assumption override applicable - if !first || (first && assume_team_known) { - Ok(events) - } else { - Err(error::CannotDetermineTeams) - } - } - - pub fn team_plays( - &self, - team: Team, - assume_team_known: Option, - ) -> Result, error::CannotDetermineTeams> { - Ok(self - .team_events(team, assume_team_known)? - .iter() - .filter_map(|event| { - if let Event::Play(play) = event { - Some(play.to_owned()) - } else { - None - } - }) - .collect()) - } - - pub fn quarters(&self) -> Vec { - let mut quarters: Vec = vec![self.start.to_owned()]; - - if self.end.is_none() { - return quarters; - } - - let order = vec![ - Quarter::First, - Quarter::Second, - Quarter::Third, - Quarter::Fourth, - ]; - - let start = if let Quarter::Overtime(x) = self.start { - (3 + x) as usize - } else { - order.iter().position(|q| q == &self.start).unwrap() - }; - - let end = if let Quarter::Overtime(x) = self.end.as_ref().unwrap() { - (3 + x) as usize - } else { - order - .iter() - .position(|q| q == self.end.as_ref().unwrap()) - .unwrap() - }; - - let range: Vec = ((start + 1)..=end).collect(); - - for i in range { - quarters.push(match i { - 0 => Quarter::First, - 1 => Quarter::Second, - 2 => Quarter::Third, - 3 => Quarter::Fourth, - _ => Quarter::Overtime((i - 3) as u8), - }); - } - - quarters - } - - pub fn is_overtime(&self) -> bool { - self.start.is_overtime() || self.end.as_ref().is_some_and(|some| some.is_overtime()) - } -} - -#[derive(Debug, Deserialize, Clone, PartialEq)] +#[derive(Debug, Deserialize, Clone, PartialEq, EnumIter)] pub enum Quarter { First, Second, @@ -127,159 +9,3 @@ pub enum Quarter { Fourth, Overtime(u8), } - -impl Quarter { - pub fn is_overtime(&self) -> bool { - if let Self::Overtime(_) = self { - true - } else { - false - } - } -} - -#[cfg(test)] -mod tests { - use crate::*; - - #[test] - fn team_events() { - let a = Period { - start: Quarter::First, - end: None, - events: vec![ - Event::Kickoff(Team::Nebraska), - Event::Play(Play::default()), - Event::Turnover(Team::ArizonaState), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Kickoff(Team::Nebraska), - Event::Score(ScorePoints::Touchdown), - Event::Kickoff(Team::SouthCarolina), - ], - }; - - let b = Period { - start: Quarter::Second, - end: None, - events: vec![ - Event::Play(Play::default()), - Event::Turnover(Team::SouthCarolina), - ], - }; - - let c = Period { - start: Quarter::Second, - end: None, - events: vec![ - Event::Play(Play::default()), - Event::Turnover(Team::Nebraska), - ], - }; - - let d = Period { - start: Quarter::Second, - end: None, - events: vec![Event::Play(Play::default())], - }; - - assert!( - a.team_events(Team::Nebraska, None).unwrap() - == vec![ - Event::Kickoff(Team::Nebraska), - Event::Play(Play::default()), - Event::Turnover(Team::ArizonaState), - Event::Kickoff(Team::Nebraska), - Event::Score(ScorePoints::Touchdown), - Event::Kickoff(Team::SouthCarolina), - ] - ); - assert!( - b.team_events(Team::Nebraska, None).unwrap() - == vec![ - Event::Play(Play::default()), - Event::Turnover(Team::SouthCarolina) - ] - ); - assert!( - c.team_events(Team::Nebraska, None).unwrap() == vec![Event::Turnover(Team::Nebraska)] - ); - assert!(true == d.team_events(Team::Nebraska, None).is_err()); - assert!(false == d.team_events(Team::Nebraska, Some(true)).is_err()) - } - - #[test] - fn team_plays() { - let period = Period { - start: Quarter::First, - end: None, - events: vec![ - Event::Kickoff(Team::Nebraska), - Event::Play(Play::default()), - Event::Turnover(Team::ArizonaState), - Event::Play(Play::default()), - Event::Play(Play::default()), - Event::Kickoff(Team::Nebraska), - Event::Play(Play::default()), - Event::Score(ScorePoints::default()), - Event::Kickoff(Team::SouthCarolina), - Event::Play(Play::default()), - Event::Turnover(Team::Nebraska), - Event::Play(Play::default()), - ], - }; - - assert!( - period.team_plays(Team::Nebraska, None).unwrap() - == vec![Play::default(), Play::default(), Play::default()] - ); - } - - #[test] - fn quarters() { - let first = Period { - start: Quarter::First, - end: None, - events: vec![], - }; - - let second_fourth = Period { - start: Quarter::Second, - end: Some(Quarter::Fourth), - events: vec![], - }; - - let third_ot_three = Period { - start: Quarter::Third, - end: Some(Quarter::Overtime(3)), - events: vec![], - }; - - let ot_one_three = Period { - start: Quarter::Overtime(1), - end: Some(Quarter::Overtime(3)), - events: vec![], - }; - - assert!(first.quarters() == vec![Quarter::First]); - assert!(second_fourth.quarters() == vec![Quarter::Second, Quarter::Third, Quarter::Fourth]); - assert!( - third_ot_three.quarters() - == vec![ - Quarter::Third, - Quarter::Fourth, - Quarter::Overtime(1), - Quarter::Overtime(2), - Quarter::Overtime(3) - ] - ); - assert!( - ot_one_three.quarters() - == vec![ - Quarter::Overtime(1), - Quarter::Overtime(2), - Quarter::Overtime(3) - ] - ) - } -} diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 4990f65..8cb997d 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -64,7 +64,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "gamelog" -version = "0.6.0" +version = "0.7.0" dependencies = [ "ron", "semver", -- 2.49.1 From aa7f9870291f6a686315ec4edca9590e4a04afc9 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Tue, 22 Apr 2025 15:39:22 -0400 Subject: [PATCH 16/21] Add SheerDumbFuckingLuck flag. --- gamelog/Cargo.lock | 2 +- gamelog/Cargo.toml | 2 +- gamelog/src/game.rs | 1 + miller/Cargo.lock | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gamelog/Cargo.lock b/gamelog/Cargo.lock index e542113..34e43de 100644 --- a/gamelog/Cargo.lock +++ b/gamelog/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "gamelog" -version = "0.7.0" +version = "0.7.1" dependencies = [ "ron", "semver", diff --git a/gamelog/Cargo.toml b/gamelog/Cargo.toml index c014abc..e554533 100644 --- a/gamelog/Cargo.toml +++ b/gamelog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamelog" -version = "0.7.0" +version = "0.7.1" edition = "2024" [dependencies] diff --git a/gamelog/src/game.rs b/gamelog/src/game.rs index 926d9ce..3958078 100644 --- a/gamelog/src/game.rs +++ b/gamelog/src/game.rs @@ -283,6 +283,7 @@ pub enum Flags { IgnoreTeam(Team), IgnoreScore, Interval(u8), + SheerDumbFuckingLuck } /* diff --git a/miller/Cargo.lock b/miller/Cargo.lock index 8cb997d..feeb3e7 100644 --- a/miller/Cargo.lock +++ b/miller/Cargo.lock @@ -64,7 +64,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "gamelog" -version = "0.7.0" +version = "0.7.1" dependencies = [ "ron", "semver", -- 2.49.1 From 5c473c5eeea777f2d2fd6a560b95ccd6acf1ba73 Mon Sep 17 00:00:00 2001 From: Olivia Brooks <109807080+Cutieguwu@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:08:54 -0400 Subject: [PATCH 17/21] Update gamelog.ron --- gamelog.ron | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) diff --git a/gamelog.ron b/gamelog.ron index 1bcc2af..cd25145 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1002,5 +1002,378 @@ ) //Texas 17, SouthCarolina 0 ] + ), + Game( + version: "0.7.0", + flags: [Interval(3)], + events: [ + Quarter(1), + Kickoff(ArizonaState), + Play( + action: Unknown, + down: Second, + terrain: Yards(4), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(4), + ), + Penalty(Yards(9), + Play( + action: PlayActionComebacks, + down: Fourth, + terrain: Yards(3), + ), + Quarter(Second), + Play( + action: HailMary, + down: None, + terrain: None + ), + Turnover(Iowa), + Play( + action: Unknown, // Iform throw + down: Second, + terrain: Inches + ), + Play( + action:Unknown, + down: First + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(11) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(11) + ), + Play( + action: PlayActionBoot, + down: Fourth, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: None, + terrain: None + ), + Turnover(ArizonaState), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Quarter(Third), + Kickoff(Iowa), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: HalfbackSlipScreen, + down: First, + terrain: Yards(10), + ), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(11), + ), + Turnover(ArizonaState) + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Quarter(Fourth), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(1), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: Second, + terrain: Yards(3), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: GoalLine, + ), + Score(FieldGoal), + Kickoff(Iowa), + Play( + action: HailMary, + down: First, + terrain: Yards(10), + ) + ] + ), + Game( + version: "0.7.1", + flags: [Interval(3), SheerDumbFuckingLuck], + events: [ + Quarter(First), + Kickoff(Nebraska), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Play( + action: SlantBubble, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionPowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(5), + ), + Play( + action: HalfbackSlipScreen, + down: Third, + terrain: Yards(5), + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Penalty(Yards(15)), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(22) + ) + Play( + action: SlotOut, + down: Third, + terrain: Yards(22) + ) + Quarter(Second), + Play( + action: StrongFlood, + down: None, + terrain: None, + ), + Turnover(TexasAnM), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Curls, + down: First, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: First, + terrain: GoalLine + ) + Play( + action: Unknown, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(Nebraska), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(13), + ), + Quarter(Third), + Kickoff(TexasAnM), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(15), + ), + Play( + action: FleaFlicker, + down: Third, + terrain: Yards(15), + ), + Play( + action: StrongFlood, + down: Fourth, + terrain: Yards(19), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Turnover(Nebraska), + Play( + action: SlotOut, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: Third, + terrain: Yards(7), + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Quarter(Fourth), + Penalty(Yards(15)) + Play( + action: StrongFlood, + down: Second, + terrain: Yards(11), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Fourth, + terrain: Yards(1), + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(TexasAnM), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(Inches), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(17), + ), + Play( + action: PlayActionBoot, //Fucking bull + down: None, + terrain: None, + ), + Score(Touchdown), // Accross 75% of the field + Score(2), + Kickoff(Nebraska), + Play( + action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. + down: None, + terrain: None, + ), + ] ) ] -- 2.49.1 From 8ba0e95b7429427bf47b83ddb19ceeb2f5664ab4 Mon Sep 17 00:00:00 2001 From: Olivia Brooks <109807080+Cutieguwu@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:21:27 -0400 Subject: [PATCH 18/21] Revert "Update gamelog.ron" This reverts commit 5c473c5eeea777f2d2fd6a560b95ccd6acf1ba73. --- gamelog.ron | 373 ---------------------------------------------------- 1 file changed, 373 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index cd25145..1bcc2af 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1002,378 +1002,5 @@ ) //Texas 17, SouthCarolina 0 ] - ), - Game( - version: "0.7.0", - flags: [Interval(3)], - events: [ - Quarter(1), - Kickoff(ArizonaState), - Play( - action: Unknown, - down: Second, - terrain: Yards(4), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(4), - ), - Penalty(Yards(9), - Play( - action: PlayActionComebacks, - down: Fourth, - terrain: Yards(3), - ), - Quarter(Second), - Play( - action: HailMary, - down: None, - terrain: None - ), - Turnover(Iowa), - Play( - action: Unknown, // Iform throw - down: Second, - terrain: Inches - ), - Play( - action:Unknown, - down: First - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(11) - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(11) - ), - Play( - action: PlayActionBoot, - down: Fourth, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: None, - terrain: None - ), - Turnover(ArizonaState), - Play( - action: PlayActionComebacks, - down: Second, - terrain: Yards(1), - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Quarter(Third), - Kickoff(Iowa), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(11), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(11), - ), - Play( - action: HalfbackSlipScreen, - down: First, - terrain: Yards(10), - ), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(11), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(11), - ), - Turnover(ArizonaState) - Play( - action: HalfbackSlipScreen, - down: Second, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, - down: First, - terrain: Yards(10) - ), - Quarter(Fourth), - Play( - action: PlayActionBoot, - down: Second, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(1), - ), - Play( - action: PowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, - down: Second, - terrain: Yards(3), - ), - Play( - action: PlayActionBoot, - down: First, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Second, - terrain: Yards(1), - ), - Play( - action: HalfbackSlam, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: GoalLine, - ), - Score(FieldGoal), - Kickoff(Iowa), - Play( - action: HailMary, - down: First, - terrain: Yards(10), - ) - ] - ), - Game( - version: "0.7.1", - flags: [Interval(3), SheerDumbFuckingLuck], - events: [ - Quarter(First), - Kickoff(Nebraska), - Play( - action: SlotOut, - down: First, - terrain: Yards(10), - ), - Play( - action: SlantBubble, - down: Second, - terrain: Yards(10), - ), - Play( - action: PowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: PlayActionPowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: CrackStudentBodyRightTackle, - down: Second, - terrain: Yards(5), - ), - Play( - action: HalfbackSlipScreen, - down: Third, - terrain: Yards(5), - ), - Play( - action: SlotOut, - down: First, - terrain: Yards(10), - ), - Penalty(Yards(15)), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(22) - ) - Play( - action: SlotOut, - down: Third, - terrain: Yards(22) - ) - Quarter(Second), - Play( - action: StrongFlood, - down: None, - terrain: None, - ), - Turnover(TexasAnM), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Curls, - down: First, - terrain: Yards(10) - ), - Play( - action: SlotOut, - down: Second, - terrain: Yards(1), - ), - Play( - action: Unknown, - down: First, - terrain: GoalLine - ) - Play( - action: Unknown, - down: None, - terrain: None, - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(Nebraska), - Play( - action: PlayActionBoot, - down: Second, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Yards(13), - ), - Quarter(Third), - Kickoff(TexasAnM), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, - down: Second, - terrain: Yards(15), - ), - Play( - action: FleaFlicker, - down: Third, - terrain: Yards(15), - ), - Play( - action: StrongFlood, - down: Fourth, - terrain: Yards(19), - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Turnover(Nebraska), - Play( - action: SlotOut, - down: Second, - terrain: Yards(10), - ), - Play( - action: PowerZero, - down: Third, - terrain: Yards(7), - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10), - ), - Quarter(Fourth), - Penalty(Yards(15)) - Play( - action: StrongFlood, - down: Second, - terrain: Yards(11), - ), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Fourth, - terrain: Yards(1), - ), - Play( - action: PlayActionComebacks, - down: None, - terrain: None, - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(TexasAnM), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(Inches), - ), - Play( - action: PlayActionBoot, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(17), - ), - Play( - action: PlayActionBoot, //Fucking bull - down: None, - terrain: None, - ), - Score(Touchdown), // Accross 75% of the field - Score(2), - Kickoff(Nebraska), - Play( - action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. - down: None, - terrain: None, - ), - ] ) ] -- 2.49.1 From 6b341f5b1f38ac0b34f612326e7c60ca9416ff21 Mon Sep 17 00:00:00 2001 From: Olivia Brooks <109807080+Cutieguwu@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:21:59 -0400 Subject: [PATCH 19/21] Reapply "Update gamelog.ron" This reverts commit 8ba0e95b7429427bf47b83ddb19ceeb2f5664ab4. --- gamelog.ron | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) diff --git a/gamelog.ron b/gamelog.ron index 1bcc2af..cd25145 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1002,5 +1002,378 @@ ) //Texas 17, SouthCarolina 0 ] + ), + Game( + version: "0.7.0", + flags: [Interval(3)], + events: [ + Quarter(1), + Kickoff(ArizonaState), + Play( + action: Unknown, + down: Second, + terrain: Yards(4), + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(4), + ), + Penalty(Yards(9), + Play( + action: PlayActionComebacks, + down: Fourth, + terrain: Yards(3), + ), + Quarter(Second), + Play( + action: HailMary, + down: None, + terrain: None + ), + Turnover(Iowa), + Play( + action: Unknown, // Iform throw + down: Second, + terrain: Inches + ), + Play( + action:Unknown, + down: First + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(11) + ), + Play( + action: Unknown, + down: Third, + terrain: Yards(11) + ), + Play( + action: PlayActionBoot, + down: Fourth, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: None, + terrain: None + ), + Turnover(ArizonaState), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Quarter(Third), + Kickoff(Iowa), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: HalfbackSlipScreen, + down: First, + terrain: Yards(10), + ), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(11), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(11), + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(11), + ), + Turnover(ArizonaState) + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Quarter(Fourth), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(1), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: HalfbackSlam, + down: Second, + terrain: Yards(3), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: HalfbackSlam, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: GoalLine, + ), + Score(FieldGoal), + Kickoff(Iowa), + Play( + action: HailMary, + down: First, + terrain: Yards(10), + ) + ] + ), + Game( + version: "0.7.1", + flags: [Interval(3), SheerDumbFuckingLuck], + events: [ + Quarter(First), + Kickoff(Nebraska), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Play( + action: SlantBubble, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionPowerZero, + down: First, + terrain: Yards(10), + ), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(5), + ), + Play( + action: HalfbackSlipScreen, + down: Third, + terrain: Yards(5), + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10), + ), + Penalty(Yards(15)), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(22) + ) + Play( + action: SlotOut, + down: Third, + terrain: Yards(22) + ) + Quarter(Second), + Play( + action: StrongFlood, + down: None, + terrain: None, + ), + Turnover(TexasAnM), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Play( + action: Curls, + down: First, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: Second, + terrain: Yards(1), + ), + Play( + action: Unknown, + down: First, + terrain: GoalLine + ) + Play( + action: Unknown, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(Nebraska), + Play( + action: PlayActionBoot, + down: Second, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(13), + ), + Quarter(Third), + Kickoff(TexasAnM), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Play( + action: PlayActionComebacks, + down: Second, + terrain: Yards(15), + ), + Play( + action: FleaFlicker, + down: Third, + terrain: Yards(15), + ), + Play( + action: StrongFlood, + down: Fourth, + terrain: Yards(19), + ), + Play( + action: Unknown, + down: None, + terrain: None, + ), + Turnover(Nebraska), + Play( + action: SlotOut, + down: Second, + terrain: Yards(10), + ), + Play( + action: PowerZero, + down: Third, + terrain: Yards(7), + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10), + ), + Quarter(Fourth), + Penalty(Yards(15)) + Play( + action: StrongFlood, + down: Second, + terrain: Yards(11), + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(10), + ), + Play( + action: SlotOut, + down: Fourth, + terrain: Yards(1), + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None, + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(TexasAnM), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(Inches), + ), + Play( + action: PlayActionBoot, + down: First, + terrain: Yards(10), + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(17), + ), + Play( + action: PlayActionBoot, //Fucking bull + down: None, + terrain: None, + ), + Score(Touchdown), // Accross 75% of the field + Score(2), + Kickoff(Nebraska), + Play( + action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. + down: None, + terrain: None, + ), + ] ) ] -- 2.49.1 From 5e72751cea3bca91d112ca695d776110b84b4348 Mon Sep 17 00:00:00 2001 From: Olivia Brooks <109807080+Cutieguwu@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:22:30 -0400 Subject: [PATCH 20/21] Revert "Update gamelog.ron" This reverts commit 6237084e64fd5f2ce02467c4c2c78ad0bcdc9fe2. --- gamelog.ron | 373 ---------------------------------------------------- 1 file changed, 373 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index 8d863bf..4757b78 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1472,378 +1472,5 @@ ] ), ] - ), - Game( - version: "0.7.0", - flags: [Interval(3)], - events: [ - Quarter(1), - Kickoff(ArizonaState), - Play( - action: Unknown, - down: Second, - terrain: Yards(4), - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(4), - ), - Penalty(Yards(9), - Play( - action: PlayActionComebacks, - down: Fourth, - terrain: Yards(3), - ), - Quarter(Second), - Play( - action: HailMary, - down: None, - terrain: None - ), - Turnover(Iowa), - Play( - action: Unknown, // Iform throw - down: Second, - terrain: Inches - ), - Play( - action:Unknown, - down: First - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(11) - ), - Play( - action: Unknown, - down: Third, - terrain: Yards(11) - ), - Play( - action: PlayActionBoot, - down: Fourth, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: None, - terrain: None - ), - Turnover(ArizonaState), - Play( - action: PlayActionComebacks, - down: Second, - terrain: Yards(1), - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Quarter(Third), - Kickoff(Iowa), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(11), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(11), - ), - Play( - action: HalfbackSlipScreen, - down: First, - terrain: Yards(10), - ), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(11), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(11), - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(11), - ), - Turnover(ArizonaState) - Play( - action: HalfbackSlipScreen, - down: Second, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, - down: First, - terrain: Yards(10) - ), - Quarter(Fourth), - Play( - action: PlayActionBoot, - down: Second, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(1), - ), - Play( - action: PowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: HalfbackSlam, - down: Second, - terrain: Yards(3), - ), - Play( - action: PlayActionBoot, - down: First, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Second, - terrain: Yards(1), - ), - Play( - action: HalfbackSlam, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: GoalLine, - ), - Score(FieldGoal), - Kickoff(Iowa), - Play( - action: HailMary, - down: First, - terrain: Yards(10), - ) - ] - ), - Game( - version: "0.7.1", - flags: [Interval(3), SheerDumbFuckingLuck], - events: [ - Quarter(First), - Kickoff(Nebraska), - Play( - action: SlotOut, - down: First, - terrain: Yards(10), - ), - Play( - action: SlantBubble, - down: Second, - terrain: Yards(10), - ), - Play( - action: PowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: PlayActionPowerZero, - down: First, - terrain: Yards(10), - ), - Play( - action: CrackStudentBodyRightTackle, - down: Second, - terrain: Yards(5), - ), - Play( - action: HalfbackSlipScreen, - down: Third, - terrain: Yards(5), - ), - Play( - action: SlotOut, - down: First, - terrain: Yards(10), - ), - Penalty(Yards(15)), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(22) - ) - Play( - action: SlotOut, - down: Third, - terrain: Yards(22) - ) - Quarter(Second), - Play( - action: StrongFlood, - down: None, - terrain: None, - ), - Turnover(TexasAnM), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Play( - action: Curls, - down: First, - terrain: Yards(10) - ), - Play( - action: SlotOut, - down: Second, - terrain: Yards(1), - ), - Play( - action: Unknown, - down: First, - terrain: GoalLine - ) - Play( - action: Unknown, - down: None, - terrain: None, - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(Nebraska), - Play( - action: PlayActionBoot, - down: Second, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Yards(13), - ), - Quarter(Third), - Kickoff(TexasAnM), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10), - ), - Play( - action: PlayActionComebacks, - down: Second, - terrain: Yards(15), - ), - Play( - action: FleaFlicker, - down: Third, - terrain: Yards(15), - ), - Play( - action: StrongFlood, - down: Fourth, - terrain: Yards(19), - ), - Play( - action: Unknown, - down: None, - terrain: None, - ), - Turnover(Nebraska), - Play( - action: SlotOut, - down: Second, - terrain: Yards(10), - ), - Play( - action: PowerZero, - down: Third, - terrain: Yards(7), - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10), - ), - Quarter(Fourth), - Penalty(Yards(15)) - Play( - action: StrongFlood, - down: Second, - terrain: Yards(11), - ), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Yards(10), - ), - Play( - action: SlotOut, - down: Fourth, - terrain: Yards(1), - ), - Play( - action: PlayActionComebacks, - down: None, - terrain: None, - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(TexasAnM), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(Inches), - ), - Play( - action: PlayActionBoot, - down: First, - terrain: Yards(10), - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(17), - ), - Play( - action: PlayActionBoot, //Fucking bull - down: None, - terrain: None, - ), - Score(Touchdown), // Accross 75% of the field - Score(2), - Kickoff(Nebraska), - Play( - action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. - down: None, - terrain: None, - ), - ] ) ] -- 2.49.1 From c730cddb1782ed18608012cec676cda56d6906fd Mon Sep 17 00:00:00 2001 From: Olivia Brooks <109807080+Cutieguwu@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:53:29 -0400 Subject: [PATCH 21/21] Update gamelog.ron to supporting v0.7 --- gamelog.ron | 711 ++++++++++++++++++++++++---------------------------- 1 file changed, 333 insertions(+), 378 deletions(-) diff --git a/gamelog.ron b/gamelog.ron index c549e41..67946a2 100644 --- a/gamelog.ron +++ b/gamelog.ron @@ -1007,7 +1007,329 @@ version: "0.7.0", flags: [Interval(3)], events: [ - Quarter(1), + Quarter(First), + Kickoff(Nebraska), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionPowerZero, + down: First, + terrain: Yards(10) + ), + Play( + action: StrongFlood, + down: First, + terrain: Yards(10) + ), + Play( + action: HalfbackSlipScreen, + down: Second, + terrain: Yards(13), + ), + Play( + action: PlayActionBoot, + down: Third, + terrain: Yards(13) + ), + Play( + action: SlotOut, + down: Fourth, + terrain: Yards(13) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Quarter(Second), + Play( + action: Curls, + down: Second, + terrain: Yards(10) + ), + Play( + action: CrackStudentBodyRightTackle, + down: Third, + terrain: Yards(4) + ), + Play( + action: Unknown, + down: First, + terrain: GoalLine + ), + Play( + action: Unknown, + down: Second, + terrain: GoalLine + ), + Score(Touchdown), + Score(PatTouchdown), + Kickoff(Syracuse), + Penalty(Yards(15)), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(19) + ), + Play( + action: HalfbackSweep, + down: Third, + terrain: Yards(13) + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(11) + ), + Quarter(Third), + Kickoff(Syracuse), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(11) + ), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Inches, + ), + Play( + action: HalfbackSweep, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: GoalLine + ), + Play( + action: Unknown, + down: Second, + terrain: GoalLine + ), + Quarter(Fourth), + Play( + action: StrongFlood, + down: Third, + terrain: GoalLine + ), + Score(Touchdown), + Score(PatTouchdown), + Kickoff(Nebraska), + Play( + action: Curls, + down: Second, + terrain: Yards(1) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: Curls, + down: Second, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: Third, + terrain: Yards(10) + ), + Turnover(Syracuse), + Play( + action: Unknown, + down: Second, + terrain: Yards(1) + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10), + ), + Quarter(Overtime(1)), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(8) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None + ), + Turnover(Syracuse), + Play( + action: Unknown, // It failed so bad. + down: Second, + terrain: Yards(15) + ), + Play( + action: Unknown, // It failed so bad. + down: Third, + terrain: Yards(22) + ), + Play( + action: PlayActionBoot, + down: Fourth, + terrain: Yards(10) + ), + Score(FieldGoal) + ] + ), + Game( + version: "0.7.0", + flags: [Interval(3)], + events: [ + Quarter(First), + Kickoff(SouthCarolina), + Play( + action: FleaFlicker, + down: Second, + terrain: Yards(16) + ), + Play( + action: HalfbackSlipScreen, + down: Third, + terrain: Yards(13) + ), + Play( + action: Unknown, + down: Fourth, + terrain: Yards(8) + ), + Play( + action: HailMary, + down: None, + terrain: None + ), + Turnover(Colorado), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: PlayActionComebacks, + down: None, + terrain: None + ), + Turnover(SouthCarolina), + Quarter(Second), + Play( + action: HalfbackSweep, + down: Second, + terrain: Yards(13) + ), + Play( + action: Mesh, + down: Third, + terrain: Yards(9) + ), + Play( + action: FleaFlicker, + down: None, + terrain: None + ), + Turnover(Colorado), + Play( + action: StrongFlood, + down: Second, + terrain: Yards(8) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Play( + action: SlotOut, + down: First, + terrain: Yards(10) + ), + Score(Touchdown), + Score(PatSafety), + Kickoff(SouthCarolina), + Play( + action: CrackStudentBodyRightTackle, + down: First, + terrain: Yards(10) + ), + Play( + action: CrackStudentBodyRightTackle, + down: Second, + terrain: Yards(9) + ), + Play( + action: Unknown, + down: None, + terrain: None + ), + Quarter(Third), + Kickoff(Colorado), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(4) + ), + Play( + action: Unknown, + down: First, + terrain: Yards(10) + ), + Play( + action: Unknown, + down: Second, + terrain: Yards(13) + ), + Play( + action: PlayActionComebacks, + down: First, + terrain: Yards(10) + ), + Quarter(Fourth), + Play( + action: SpeedOption, + down: Second, + terrain: Yards(6) + ), + Penalty(Yards(11)), + Play( + action: PlayActionComebacks, + down: Third, + terrain: Yards(5) + ), + Play( + action: HalfbackSlipScreen, + down: First, + terrain: Yards(10) + ), + ] + ), + Game( + version: "0.7.0", + flags: [Interval(3)], + events: [ + Quarter(First), Kickoff(ArizonaState), Play( action: Unknown, @@ -1019,7 +1341,7 @@ down: Third, terrain: Yards(4), ), - Penalty(Yards(9), + Penalty(Yards(9)), Play( action: PlayActionComebacks, down: Fourth, @@ -1039,7 +1361,7 @@ ), Play( action:Unknown, - down: First + down: First, terrain: Yards(10) ), Play( @@ -1105,7 +1427,7 @@ down: Fourth, terrain: Yards(11), ), - Turnover(ArizonaState) + Turnover(ArizonaState), Play( action: HalfbackSlipScreen, down: Second, @@ -1212,12 +1534,12 @@ action: StrongFlood, down: Second, terrain: Yards(22) - ) + ), Play( action: SlotOut, down: Third, terrain: Yards(22) - ) + ), Quarter(Second), Play( action: StrongFlood, @@ -1259,7 +1581,7 @@ action: Unknown, down: First, terrain: GoalLine - ) + ), Play( action: Unknown, down: None, @@ -1322,7 +1644,7 @@ terrain: Yards(10), ), Quarter(Fourth), - Penalty(Yards(15)) + Penalty(Yards(15)), Play( action: StrongFlood, down: Second, @@ -1349,7 +1671,7 @@ Play( action: StrongFlood, down: Second, - terrain: Yards(Inches), + terrain: Inches, ), Play( action: PlayActionBoot, @@ -1366,8 +1688,8 @@ down: None, terrain: None, ), - Score(Touchdown), // Accross 75% of the field - Score(2), + Score(Touchdown), // Across 75% of the field + Score(PatTouchdown), Kickoff(Nebraska), Play( action: Unknown, // Fucking hit the wrong button. Fake punted instead of punted. @@ -1375,372 +1697,5 @@ terrain: None, ), ] - ), - Game( - version: "0.6.0", - flags: [Interval(3)], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(Nebraska), - Play( - action: SlotOut, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionPowerZero, - down: First, - terrain: Yards(10) - ), - Play( - action: StrongFlood, - down: First, - terrain: Yards(10) - ), - Play( - action: HalfbackSlipScreen, - down: Second, - terrain: Yards(13), - ), - Play( - action: PlayActionBoot, - down: Third, - terrain: Yards(13) - ), - Play( - action: SlotOut, - down: Fourth, - terrain: Yards(13) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ) - ] - ), - Period( - start: Second, - end: None, - events: [ - Play( - action: Curls, - down: Second, - terrain: Yards(10) - ), - Play( - action: CrackStudentBodyRightTackle, - down: Third, - terrain: Yards(4) - ), - Play( - action: Unknown, - down: First, - terrain: GoalLine - ), - Play( - action: Unknown, - down: Second, - terrain: GoalLine - ), - Score(Touchdown), - Score(PatTouchdown), - Kickoff(Syracuse), - Penalty(Yards(15)), - Play( - action: CrackStudentBodyRightTackle, - down: Second, - terrain: Yards(19) - ), - Play( - action: HalfbackSweep, - down: Third, - terrain: Yards(13) - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(11) - ) - ] - ), - Period( - start: Third, - end: None, - events: [ - Kickoff(Syracuse), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(11) - ), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Inches, - ), - Play( - action: HalfbackSweep, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: GoalLine - ), - Play( - action: Unknown, - down: Second, - terrain: GoalLine - ) - ] - ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: StrongFlood, - down: Third, - terrain: GoalLine - ), - Score(Touchdown), - Score(PatTouchdown), - Kickoff(Nebraska), - Play( - action: Curls, - down: Second, - terrain: Yards(1) - ), - Play( - action: SlotOut, - down: First, - terrain: Yards(10) - ), - Play( - action: Curls, - down: Second, - terrain: Yards(10) - ), - Play( - action: SlotOut, - down: Third, - terrain: Yards(10) - ), - Turnover(Syracuse), - Play( - action: Unknown, - down: Second, - terrain: Yards(1) - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10), - ), - ] - ), - Period( - start: Overtime(1), - end: None, - events: [ - Play( - action: StrongFlood, - down: Second, - terrain: Yards(8) - ), - Play( - action: SlotOut, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: None, - terrain: None - ), - Turnover(Syracuse), - Play( - action: Unknown, // It failed so bad. - down: Second, - terrain: Yards(15) - ), - Play( - action: Unknown, // It failed so bad. - down: Third, - terrain: Yards(22) - ), - Play( - action: PlayActionBoot, - down: Fourth, - terrain: Yards(10) - ), - Score(FieldGoal) - ] - ) - ] - ), - Game( - version: "0.6.1", - flags: [Interval(3)], - periods: [ - Period( - start: First, - end: None, - events: [ - Kickoff(SouthCarolina), - Play( - action: FleaFlicker, - down: Second, - terrain: Yards(16) - ), - Play( - action: HalfbackSlipScreen, - down: Third, - terrain: Yards(13) - ), - Play( - action: Unknown, - down: Fourth, - terrain: Yards(8) - ), - Play( - action: HailMary, - down: None, - terrain: None - ), - Turnover(Colorado), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ), - Play( - action: PlayActionComebacks, - down: None, - terrain: None - ), - Turnover(SouthCarolina) - ] - ), - Period( - start: Second, - end: None, - events: [ - Play( - action: HalfbackSweep, - down: Second, - terrain: Yards(13) - ), - Play( - action: Mesh, - down: Third, - terrain: Yards(9) - ), - Play( - action: FleaFlicker, - down: None, - terrain: None - ), - Turnover(Colorado), - Play( - action: StrongFlood, - down: Second, - terrain: Yards(8) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ), - Play( - action: SlotOut, - down: First, - terrain: Yards(10) - ), - Score(Touchdown), - Score(PatSafety), - Kickoff(SouthCarolina), - Play( - action: CrackStudentBodyRightTackle, - down: First, - terrain: Yards(10) - ), - Play( - action: CrackStudentBodyRightTackle, - down: Second, - terrain: Yards(9) - ), - Play( - action: Unknown, - down: None, - terrain: None - ) - ] - ), - Period( - start: Third, - end: None, - events: [ - Kickoff(Colorado), - Play( - action: SpeedOption, - down: Second, - terrain: Yards(4) - ), - Play( - action: Unknown, - down: First, - terrain: Yards(10) - ), - Play( - action: Unknown, - down: Second, - terrain: Yards(13) - ), - Play( - action: PlayActionComebacks, - down: First, - terrain: Yards(10) - ) - ] - ), - Period( - start: Fourth, - end: None, - events: [ - Play( - action: SpeedOption, - down: Second, - terrain: Yards(6) - ), - Penalty(Yards(11)), - Play( - action: PlayActionComebacks, - down: Third, - terrain: Yards(5) - ), - Play( - action: HalfbackSlipScreen, - down: First, - terrain: Yards(10) - ), - ] - ), - ] ) ] -- 2.49.1