Skip to content

State pattern example for OO training. Visual Studio 2010.

Notifications You must be signed in to change notification settings

nick-zhang/StatePattern

 
 

Repository files navigation

StatePattern

A simple example of DrawPad demo-ing the state pattern.

State pattern applied to the mouse class when handling different drawing operations.

Requirements

  • Draw rectangle. 2 clicks. First click for top left, second click for bottom right.
  • Draw circle. 2 clicks. First click for center, second click for radius.
  • Draw ellipse. 2 clicks. To specify out-bound rectangle, first click for top left, second click for bottom right.
  • Draw triangle. 3 clicks. Three clicks for each top.
  • Draw arc. 3 clicks. First click for center, second click for begin, third click for end.
  • Draw polygon. N clicks. Double click or click on the start point to finish.

About

State pattern example for OO training. Visual Studio 2010.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%