コード例 #1
0
 //Constructor
 public Cell()
 {
     //start with 0 amount of cell A and B and set random color
     A     = 1;
     B     = 0;
     Color = new RGBcolor();
     UpdateColor();
 }
コード例 #2
0
        //Create random color class
        public static RGBcolor CreateRandomColor()
        {
            RGBcolor color = new RGBcolor();
            Random   rnd   = new Random();

            color.R = rnd.NextDouble() * 255;
            color.B = rnd.NextDouble() * 255;
            color.G = rnd.NextDouble() * 255;
            return(color);
        }