Step 3: Apply the flocking rules, as a set of functions in the boid class (called from update()).
One important issue is how to combine the instructions from the different rules. This implementation uses a very simple prioritization scheme. Whichever rule says it has the highest priority is followed.
flock2.cpp
boid2.h
boid2.cpp
boidSpecies2.h
boidSpecies2.cpp