def test_dobule_mark_dead(board, point): board.mark_alive(point=point) board.mark_dead(point=point) board.mark_dead(point=point) assert is_empty(board.to_array())
def test_mark_alive(board, faker): point = Point(x=faker.pyint(min_value=0, max_value=board.width - 1), y=faker.pyint(min_value=0, max_value=board.height - 1)) board.mark_alive(point=point) assert not is_empty(board.to_array()) assert board.get(point) is CeilState.ALIVE
def test_double_mark_alive(board, point): board.mark_alive(point=point) board.mark_alive(point=point) assert not is_empty(board.to_array()) assert board.get(point) is CeilState.ALIVE
def test_get_empty_ceils(board): assert is_empty(board.to_array())