Skip to content

refactor(engine): replace legacy football simulation with LoL engine for AI matches #113

Description

@NicoRuedaA

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

  • cargo build -p engine
  • cargo build -p ofm_core
  • cargo test -p engine
  • cargo test -p ofm_core

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions