static private void CellCreator(Graphics liveCellInitial, int cellKey, int x, int y) { PopulateCell(liveCellInitial, cellKey, x, y); if (cellTable[cellKey] == 1) { BoardDesign.DrawSection(Color.Green, liveCellInitial, x, y); } }
private void startButton_Click(object sender, EventArgs e) { startButton.Enabled = false; //Design Initial Board Graphics drawBoard = this.CreateGraphics(); BoardDesign.DrawSectionOfBoard(Color.AntiqueWhite, drawBoard); //Populate Initial Cells Graphics liveCellInitial = this.CreateGraphics(); LiveCells.CreateInitialState(liveCellInitial); }
static public void PopulateCell(Graphics liveZone, int cellKey, int x, int y) { cellTable[cellKey] = 1; BoardDesign.DrawSection(Color.Green, liveZone, x, y); }
static private void CellKiller(Graphics killZone, int cellKey, int x, int y) { cellTable[cellKey] = 0; BoardDesign.DrawSection(Color.Red, killZone, x, y); }