updated to use the new with template function for more concise state machine handling
updated to use the new with template function for more concise state machine handling

khklau/robocup2Dsim,khklau/robocup2Dsim,khklau/robocup2Dsim