public myDrawer(int width = 800, int height = 400) : base(width, height) { //initialize your derived Random class to 1/5 of the current scaled width random = new myRandom(ScaledWidth / 5); BBColour = Color.White; //Utilizing your derived Random class, create 100 Rectangles for (int i = 0; i < 100; i++) { AddRectangle(random.NextDrawerRect(this), RandColor.GetKnownColor()); } }
List <Rectangle> rect = new List <Rectangle>();// collection for rectangles? public myDrawer(int width = 600, int height = 300) : base(width, height) { //initialize your derived Random class to 1/5 of the current scaled width random = new myRandom(ScaledWidth / 5); BBColour = Color.White; //populateing rect list collection for (int i = 0; i < 100; i++) { rect.Add(random.NextDrawerRect(this)); } Clear(); Render(); }