public static void Main()
 {
     for (int i = 0; i < 20; ++i)
     {
         Circle circle = (Circle)ShapeFactory.getCircle(getRandomColor());
         circle.setX(getRandomX());
         circle.setY(getRandomY());
         circle.setRadius(100);
         circle.draw();
     }
 }
Example #2
0
 static void Main(string[] args)
 {
     for (int i = 0; i < 20; i++)
     {
         Circle circle = (Circle)FlyweightShapeFactory.GetCircle(getRandomColor());
         circle.setX(getRandomCoordinate());
         circle.setY(getRandomCoordinate());
         circle.setRadius(30);
         circle.Draw();
     }
 }
Example #3
0
 static void FlyweightTest()
 {
     for (int i = 0; i < 20; ++i)
     {
         Flyweight.Circle circle = (Flyweight.Circle)ShapeFactory.GetCircle(getRandomColor());
         circle.X = getRandomX();
         circle.Y = getRandomY();
         circle.setRadius(100);
         circle.Drow();
     }
 }
Example #4
0
 static void Main(string[] args)
 {
     for (int i = 0; i < 20; ++i)
     {
         Circle circle = (Circle)ShapeFactory.getCircle(getRandomColor());
         circle.setRadius(100);
         circle.setX(getRandomX());
         circle.setY(getRandomY());
         circle.draw();
     }
     Console.Read();
 }