Ejemplo n.º 1
0
def test_has_neighbors_true_21():
    test_board = BattleshipBoard(name='test')
    test_board.board = [
        [' ', ' ', ' '],
        [' ', ' ', ' '],
        [' ', '=', ' '],
    ]

    assert test_board.has_neighbors(x=1, y=1) is True
Ejemplo n.º 2
0
def test_has_neighbors_false():
    test_board = BattleshipBoard(name='test')
    test_board.board = [
        [' ', ' ', ' '],
        [' ', ' ', ' '],
        [' ', ' ', ' '],
    ]

    assert test_board.has_neighbors(x=1, y=1) is False