# Karel game
# Unit 8 Lesson 5
```javascript=
//Make Karel fill the world
//with beepers
function main() {
//your code here
while (leftIsClear()) {
putBeeperLine();
resetPosition();
}
putBeeperLine();
}
function putBeeperLine() {
putBeeper();
while (frontIsClear()) {
move();
putBeeper();
}
}
function resetPosition() {
turnAround();
while (frontIsClear()) {
move();
}
turnRight();
move();
turnRight();
}
```
## Unit 9 Lesson 2
```javascript=
//Karel must help rebuild
//broken columns. Make a
//column of beepers above
//each beeper you find on
//the first row
function main() {
while(frontIsClear()){
move();
if(beepersPresent()){
turnLeft();
while(frontIsClear()){
move();
putBeeper();
}
getBack();
}
}
}
function turnAround(){
turnLeft();
turnLeft();
}
function getBack(){
turnAround();
while(frontIsClear()){
move();
}
turnLeft();
}
```
## Unit 12 lesson 1
```javascript=
function main() {
markWalls();
putBeepersDown();
turnAround();
move();
putBeeper();
turnAround();
goToWall();
turnAround();
lastBeeperStanding();
}
//Karel moves to end walls, marking them with beepers
function markWalls() {
goToWall();
putBeeper();
turnAround();
goToWall();
putBeeper();
turnAround();
move();
}
function goToWall() {
while(frontIsClear()) {
move();
}
}
function putBeepersDown() {
while(noBeepersPresent()) {
move();
if (beepersPresent()) {
turnAround();
move();
putBeeper();
move();
}
}
}
function lastBeeperStanding() {
while (frontIsClear()) {
if (beepersPresent()) {
pickBeeper();
}
move();
}
pickBeeper();
}
```
Karel과 함께하는 더 많은 알고리즘 문제를 원한다면?
http://telnicky.github.io/kareljs/