Beispiel #1
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();
     }
 }
 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();
     }
 }
Beispiel #3
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();
 }