Untitled
Anonymous
plain_text
09/04/2021 10:55 AM
660 B
25
Indexable
function start(){
buildTower();
turnRight();
checkWall();
}
//this function makes karel to build a tower
function buildTower(){
putBall();
turnLeft();
move();
putBall();
move();
putBall();
}
function checkWall(){
if (frontIsClear()){
move();
turnRight();
move();
move();
turnLeft();
} else (frontIsBlocked()){
turnRight();
move();
move();
turnLeft();
}
}Editor is loading...