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.
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.
countPiles() still runs every 50 ticks; the
cached value persists between updates.