Beispiel #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
Beispiel #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