Unit9
Lesson2
Before | After |
![]() |
![]() ![]() |
function main() {
while(frontIsClear()){
move();
if(beepersPresent()){
findBeeper();
}
}
}
function findBeeper(){
turnLeft();
while(frontIsClear()){
move();
if(noBeepersPresent()){
putBeeper();
}
}
turnAround();
while(frontIsClear()){
move();
}
turnLeft();
}
'Algorithm > Karel' 카테고리의 다른 글
[Karel] Unit8 (0) | 2022.05.23 |
---|---|
[Karel] Unit6 (0) | 2022.05.23 |
[Karel] Unit5 (0) | 2022.05.23 |
[Karel] Unit4 (0) | 2022.05.23 |
[Karel] Unit3 (0) | 2022.05.23 |