Update the logic of func course_rob()