topic: control flow
rust mirror of conditionals. rust's match is exhaustive -- compiler enforces all cases.
concepts to demonstrate
- if/else with type-consistent arms
match on integers, enums, tuples
if let for Option unwrapping
while let for streaming data
- match guards
patriots theme
match on game state: quarter, score differential, field position.
if let Some(result) = game_log.get(week) pattern.
file
src/control_flow/game_state.rs
reference
python mirror: basic_match_name_input_NFL_legends.py