Summary
The engine::simulate() / engine::simulate_with_rng() functions are a football simulation engine that uses halves, stoppage time, and football-specific terminology. It is still used by ofm_core::turn::simulate_other_matches() to simulate AI-vs-AI matches.
Two approaches:
Option A: Replace with LoL engine
Replace engine::simulate() calls in ofm_core::turn::mod.rs with LiveMatchState::run_to_completion() or equivalent LoL simulation. This removes the legacy engine entirely.
Option B: Clean up legacy engine
Rename all football concepts in engine::simulate_with_rng() to LoL equivalents:
- "first half" / "second half" -> phase-based progression
- "stoppage time" -> remove or rename
- Zone-based resolution (attacking box, midfield, etc.) -> LoL map zones
Affected files
engine/src/engine/mod.rs: simulate_with_rng() implementation
engine/src/engine/resolution.rs: Zone-based action resolution
ofm_core/src/turn/mod.rs: Lines 684, 1227, 1251, 1260 calling engine::simulate()
engine/src/lib.rs: Public exports
engine/tests/simulation_tests.rs: All tests for the legacy engine
Build Verification
Summary
The
engine::simulate()/engine::simulate_with_rng()functions are a football simulation engine that uses halves, stoppage time, and football-specific terminology. It is still used byofm_core::turn::simulate_other_matches()to simulate AI-vs-AI matches.Two approaches:
Option A: Replace with LoL engine
Replace
engine::simulate()calls inofm_core::turn::mod.rswithLiveMatchState::run_to_completion()or equivalent LoL simulation. This removes the legacy engine entirely.Option B: Clean up legacy engine
Rename all football concepts in
engine::simulate_with_rng()to LoL equivalents:Affected files
engine/src/engine/mod.rs:simulate_with_rng()implementationengine/src/engine/resolution.rs: Zone-based action resolutionofm_core/src/turn/mod.rs: Lines 684, 1227, 1251, 1260 callingengine::simulate()engine/src/lib.rs: Public exportsengine/tests/simulation_tests.rs: All tests for the legacy engineBuild Verification