public void GetNeigbourStatesForCenterCell() { var strState = "OOO|" + "XXX|" + "OOO"; var state = HelperMethods.StringToMatrix(strState, false); var neighbour = new Neighbour(state); LivingNeighbours neighbourStates = neighbour.NrOfSuroundingLivingNeighbours(1, 1); Assert.AreEqual(LivingNeighbours.C2, neighbourStates); }
public Cell(State state, LivingNeighbours livingNeighbours) { this.State = state; this.LivingNeighbours = livingNeighbours; }