Lecture/자료구조/2011/미로문제를 풀기위한 Karel 클래스
Retired DISLab
과제를 위한 MazeProgram 클래스
import hufs.dislab.karel.Program; import hufs.dislab.karel.Robot; public class MazeProgram extends Program { /** * 로보트를 조작하는 함수 * @param robot 이 클래스의 main 함수에서 생성한 로보트 */ @Override public void run(Robot robot) { // 숙제에 필요한 코드를 여기에 작성한다. // 예를 들어 앞으로 한 칸 전진하려면 아래와 같이 작성한다. robot.move(); } public static void main(String[] args) { Robot robot = new Robot(); // 로보트 생성 Program program = new MazeProgram(); // 프로그램 생성 program.startWith(robot); // 프로그램 시작 } }