//CreateShape public Shape CreateShape(Model.ShapeType type) { switch (type) { case Model.ShapeType.LINE: return(new Line()); case Model.ShapeType.RECTANGLE: return(new Rectangle()); case Model.ShapeType.HEXAGON: return(new Hexagon()); default: return(null); } }
public DrawState(Model model, Model.ShapeType type) { _model = model; _hint = _shapeFactory.CreateShape(type); }