def test_try_move_on_invalid_column(self): board = Board() column_to_fill = 1 for i in range(board.height): board.board[i][column_to_fill] = 1 # Placement in column should now fail assert board.try_move(column_to_fill) == -1 # Other columns should still be valid assert board.try_move(column_to_fill + 1) >= 0
def test_try_move_on_valid_column(self): board = Board() for i in range(board.width): col = board.try_move(i) # expected position is bottom of board assert col == board.height - 1