Beispiel #1
0
        public static ColorPoint MakeColorPoint()
        {
            ColorPoint colorPoint = new ColorPoint();

            colorPoint.X     = RandomContainer.rnd.NextDouble();
            colorPoint.Y     = RandomContainer.rnd.NextDouble();
            colorPoint.Color = colors[RandomContainer.rnd.Next(0, colors.Length)];

            return(colorPoint);
        }
Beispiel #2
0
 public static void FillFile(int n)
 {
     using (StreamWriter writer = new StreamWriter("colors.txt"))
     {
         for (int i = 0; i < n; ++i)
         {
             var color = ColorPoint.MakeColorPoint();
             writer.WriteLine(color.ToString());
         }
     }
 }