Report as inappropriate.
Identical to the other Swarming Robots Showcase projects.
This project has had the FireflyWorld last instantiated so the algorithm can be seen on the Greenfoot website without downloading the project.
The pseudo-code for each firefly is as follows:
- Count from 1 to 12 repeatedly in a cycle
- When the count equals 12 flash
- If another firefly flashes when you’re not flashing then increase counter by 1
You may want to mute your sound before running the simulation.
Want to leave a comment? You must first log in.
No votes yet.