## Integration test: OscillatorBot vs SittingDuck, 3 rounds. ## Requires a running TR server (set TR_SERVER_JAR / TR_BATTLE_RUNNER env vars). import std/[os, unittest] import test_framework/test_framework const oscillatorDir = currentSourcePath().parentDir.parentDir # OscillatorBot_garage/ sittingDuckDir = currentSourcePath().parentDir / "bots" / "SittingDuck" suite "OscillatorBot basic battle": test "beats SittingDuck in 3 rounds": let r = runBattle(@[oscillatorDir, sittingDuckDir], rounds = 3) check r.rounds.len == 3 check r.results.len == 2 let oscillator = block: var found: BotResult for b in r.results: if b.name == "OscillatorBot": found = b found let duck = block: var found: BotResult for b in r.results: if b.name == "SittingDuck": found = b found check oscillator.totalScore > duck.totalScore check "OscillatorBot" in r.winners