Termite Wood Gathering

Termites wander randomly, picking up wood chips and dropping them near other chips. No termite knows the plan — but organized piles emerge from these simple local rules.

Tick: 0 | Piles: 0

Changelog

2026-04-05 — fix: stats display flicker during animation
Bug: the stats line below the controls flickered between “Tick: X | Piles: Y” and “Tick: X” during auto-animation. countPiles() was only called every 50th tick for performance, and on all other ticks the pile count was omitted from the display. At ~60 fps with multiple ticks per frame, the two formats alternated rapidly.
Fix: cached the last computed pile count in a variable so the display always shows both tick and pile counts. countPiles() still runs every 50 ticks; the cached value persists between updates.