Beispiel #1
0
def test_is_col_valid_false():
    """ Check that the col of board is not valid 
    """

    # default value of dimensions is (6x7)
    board = Board()
    pos = [-1, 7, 8, 9, -2, -4, 10]

    assert (board.is_col_valid(pos[0]) == False)
    assert (board.is_col_valid(pos[1]) == False)
    assert (board.is_col_valid(pos[2]) == False)
    assert (board.is_col_valid(pos[3]) == False)
    assert (board.is_col_valid(pos[4]) == False)
    assert (board.is_col_valid(pos[5]) == False)
    assert (board.is_col_valid(pos[6]) == False)
Beispiel #2
0
def test_is_col_valid_true():
    """ Check that the col of board is valid 
    """

    # default value of dimensions is (6x7)
    board = Board()
    pos = [0, 1, 2, 3, 4, 5, 6]

    assert (board.is_col_valid(pos[0]) == True)
    assert (board.is_col_valid(pos[1]) == True)
    assert (board.is_col_valid(pos[2]) == True)
    assert (board.is_col_valid(pos[3]) == True)
    assert (board.is_col_valid(pos[4]) == True)
    assert (board.is_col_valid(pos[5]) == True)
    assert (board.is_col_valid(pos[6]) == True)