Make a new C++ project and add SFML—which you saw here—so you can draw the bees buzzing. The code with this book has a Bees static library for the algorithm. This is called by a unit test project and a main project named ABC. Make the library first, and feel free to add tests as you go. The tests aren’t shown here.
Start by defining a Coordinate class:
You need a Bee class with a home, current position, a favored food spot, and a role. They start out at home. Add a buzz to drive how far the bees move each time. You’ll fill in the remaining parts to this shortly:
|||explicit Bee(Role role, ...|