Termites


Green circles are food packs randomly placed in a room where there are termites shown as orange circles. The behaviour of a termite is the following :

A number on termites indicates how many packs it transports. The number of stacked food packs is indicated on the top of the stack (initially, it is 1).

The applet is made of one termite and 20 food packs. After a while, all food packs are stacked on one unique stack (except of course those that are transported by the termite). New food packs and new termites can be added at every moment. Generating the "flytox" event kills all the termites (in this case, they leave the food packs they are travelling with).