public AnimateGrid(exDGV lifeGrid) { _lifeGridControl = lifeGrid; for (var count = 0; count <= 99; count++) { _cells[count] = new int[100]; } }
public void Test_That_Cancel_Stays_False_On_Creating_Grid() { //Arrange var lifeGridControl = new exDGV(); //Act var animateGrid = new AnimateGrid(lifeGridControl); //Assert Assert.AreEqual(animateGrid.Cancelled, false); }
public static void Paint(exDGV lifeGridControl, bool cancelled, int totalCellCount, IReadOnlyList <int[]> cells) { //loop through current grid and set back color of cells if (cancelled) { return; } for (var count1 = 0; count1 <= totalCellCount; count1++) { for (var count2 = 0; count2 <= totalCellCount; count2++) { lifeGridControl.Rows[count1].Cells[count2].Style.BackColor = cells[count1][count2] > 0 ? Color.Black : Color.White; } } }