public void When_a_living_cell_with_2_living_and_1_dead_neighbor_evolves_the_result_is_alive() { B3S23CellEvolver cellEvolver = new B3S23CellEvolver(); Cell evolved = cellEvolver.Evolve(Cell.Alive, GetNeighbors(2, 1)); Assert.IsTrue(evolved.IsAlive()); }
public void When_a_living_cell_with_5_living_neighbors_evolves_the_result_is_dead() { B3S23CellEvolver cellEvolver = new B3S23CellEvolver(); Cell evolved = cellEvolver.Evolve(Cell.Alive, GetNeighbors(5)); Assert.IsFalse(evolved.IsAlive()); }
public void When_a_dead_cell_with_3_living_neighbors_evolves_the_result_is_alive() { B3S23CellEvolver cellEvolver = new B3S23CellEvolver(); Cell evolved = cellEvolver.Evolve(Cell.Dead, GetNeighbors(3)); Assert.IsTrue(evolved.IsAlive()); }