type/CirclebotBehaviors — pull request #2 by jhlassen17 (2012-03-25 20:34:27+00:00)
Title: Pull Request for Re-factored Light Sensor Classes

This is a pull request for a re-factoring of the light sensor behavior classes. The LeftLightBehavior, RightLightBehavior, and BothLightsBehavior classes had very similar code. I created a class called AbstractLightBehavior that contains these common functions. Each class then implements the changes that it needs.

I believe that this will make the code more efficient and less error prone. For example we had three different declarations for the "dark" threshold. With this change we only have one, and that is stored in the AbstractLightBehavior and can be accessed by all child classes.

As with all the pull requests I am making, I don't think we should commit them until they have been tested with the robot.