コード例 #1
0
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())
コード例 #2
0
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
コード例 #3
0
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
コード例 #4
0
def test_get_empty_ceils(board):
    assert is_empty(board.to_array())