//Generates for squares inside the lower rectangle used for displaying the players in a uniform fashion. //Players get drawn in the center of each quadrant, resulting in a grid. public new void GenerateQuadrants() { quadrants = new RectangleObject[4]; RectangleObject rectangle = GetLowerRectangle(); int spaceWidth = rectangle.GetWidth(); int spaceHeight = rectangle.GetHeight(); int quadrantWidth = spaceWidth / 2; int quadrantHeight = spaceHeight / 2; int spaceBeginX = rectangle.GetX(); int spaceBeginY = rectangle.GetY(); quadrants[0] = new RectangleObject(spaceBeginX, spaceBeginY, new Size(quadrantWidth, quadrantHeight)); quadrants[1] = new RectangleObject(spaceBeginX + quadrantWidth, spaceBeginY, new Size(quadrantWidth, quadrantHeight)); quadrants[2] = new RectangleObject(spaceBeginX, spaceBeginY + quadrantHeight, new Size(quadrantWidth, quadrantHeight)); quadrants[3] = new RectangleObject(spaceBeginX + quadrantWidth, spaceBeginY + quadrantHeight, new Size(quadrantWidth, quadrantHeight)); }
//Draws the inner rectangle of the boad with respect to the camera public override void Draw(Graphics g, int xOffset, int yOffset) { base.Draw(g, xOffset, yOffset); g.FillRectangle(Brushes.Purple, new Rectangle(innerBoard.GetX() + xOffset, innerBoard.GetY() + yOffset, innerBoard.GetWidth(), innerBoard.GetHeight())); }