public void CheckRhombus() { int[,] matrix = new int[5, 5] { { 0, 1, 0, 0, 0 }, { 1, 0, 1, 0, 0 }, { 1, 0, 1, 0, 0 }, { 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }; LifeAlgoritm LA = new LifeAlgoritm(matrix); Assert.AreEqual(matrix, LA.Matrix); }
public void CheckSomeField() { int[,] startMatrix = new int[5, 5] { { 1, 1, 0, 0, 0 }, { 0, 1, 0, 1, 1 }, { 1, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0 }, { 0, 1, 0, 0, 1 } }; LifeAlgoritm LA = new LifeAlgoritm(startMatrix); int[,] finishMatrix = new int[5, 5] { { 1, 1, 1, 0, 0 }, { 0, 1, 1, 0, 0 }, { 0, 1, 1, 1, 0 }, { 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }; Assert.AreEqual(finishMatrix, LA.Matrix); }
public void CheckThreeElementsLine() { int[,] startMatrix = new int[5, 5] { { 0, 0, 0, 0, 0 }, { 0, 1, 0, 0, 0 }, { 0, 1, 0, 0, 0 }, { 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }; LifeAlgoritm LA = new LifeAlgoritm(startMatrix); int[,] finishMatrix = new int[5, 5] { { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 1, 1, 1, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }; Assert.AreEqual(finishMatrix, LA.Matrix); }