ai-code-battle/cmd/acb-mapgen
jedarden 166d3ee277 fix(mapgen): align core placement radius with spawn radius fixes
Plan: §3.7.1 Spawn mechanics, §3.8 Map Generation

The map generator was using outdated core placement radius (0.35) that
placed cores too far apart on 40x40 maps (~28 tiles between cores on
opposite sides). This exceeded the attack radius (6 tiles for 2-player,
3.5 tiles for 3+ player), meaning generated maps didn't force combat.

The match runner was already fixed in commit e8fda06 to use:
- 2-player: primaryRadius = 0.15 (6 tiles apart = attack radius)
- 3+ player: primaryRadius = 0.063 (~3.4 tiles, within attack radius)

This change aligns cmd/acb-mapgen with the same logic, ensuring all
generated maps place cores within attack range.

Also adds validation test TestGenerateMap_CoresWithinAttackRadius to
verify cores are placed within attack radius on standard 40x40 maps.

Closes: bf-2wn4

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 08:35:13 -04:00
..
connectivity.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
main.go fix(mapgen): align core placement radius with spawn radius fixes 2026-05-25 08:35:13 -04:00
mapgen_test.go fix(mapgen): align core placement radius with spawn radius fixes 2026-05-25 08:35:13 -04:00