Thursday, January 28, 2010

Rectangle with states

After reviewing the state pattern implementation from Naro made the first step toward making the tools interactive with command line: replaced the Rectangle tool with its equivalent code implemented using states and the tool works well. The states implementation enables the tools to receive input from command line and mouse.

When the command line parser will be finished it will be integrated with the tool so that coordinates can be send also from command line. The rectangle tool implemented with states works in the same time with the other tools not supporting states.

Will continue with looking at the Extrude tool to see how this can be implemented with states as its dependencies and requirements are very different from Rectangle.

No comments: