Game Controller - northern-bites/nbites GitHub Wiki

The Game Controller interface in Behaviors interacts closely with the Game Controller subsystem in Comm. It is an FSA, representing the Game Controller states. The code for the FSA can be found here and the code for the states can be found here. This interface is mostly concerned with updating the information that Python needs, such as team color, kickoff, and game state. It also tells the LED system to execute the correct LED command for each game state (in the future it should no longer do this).

This is a system that, while elegantly designed to be an FSA, there's really no reason for it to be. All that needs to happen is a call to an update function that will update all of the necessary data, and possibly make some impact on the player FSA if the game state changes. Some thinking can be done to see which information should be checked every frame and included in the update method, and which can be wrapped in boost and only accessed from C++ when needed.