Phase 3: Behavior system with grid.step() turn manager
- Add EntityBehavior struct with 11 behavior types: IDLE, CUSTOM,
NOISE4/8, PATH, WAYPOINT, PATROL, LOOP, SLEEP, SEEK, FLEE.
Each returns BehaviorOutput (MOVED/DONE/BLOCKED/NO_ACTION) without
modifying entity position directly (closes #300)
- Add grid.step(n=1, turn_order=None) turn manager: groups entities
by turn_order, executes behaviors, fires triggers (TARGET/DONE/BLOCKED),
updates cell_position and spatial hash. Snapshot-based iteration for
callback safety (closes #301)
- Entity properties: behavior_type (read-only), turn_order, move_speed,
target_label, sight_radius. Method: set_behavior(type, waypoints,
turns, path)
- Update ColorLayer::updatePerspective to use cell_position
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>