This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

910995 presents ...


Swarming Robots Showcase - Firefly Synchronisation

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.

496 views / 1 in the last 7 days

Tags: simulation with-source

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2019-05-01 20:43:36 UTC

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.