def test_alive_con_alive_3_neighbors(self): alive_cons = [(1, 1), (2, 0), (2, 1), (2, 2)] con = (2, 1) assert main.is_alive_con(con, alive_cons) is True
def test_many_neighbors(self): alive_cons = [(1, 0), (1, 1), (2, 0), (3, 1)] con = (2, 1) assert main.is_alive_con(con, alive_cons) is False
def test_alive_con_few_neighbors(self): alive_cons = [(1, 1), (2, 1)] con = (2, 1) assert main.is_alive_con(con, alive_cons) is False
def test_new_con(self): alive_cons = [(1, 1), (2, 0), (2, 2)] con = (2, 1) assert main.is_alive_con(con, alive_cons) is True