DAY 30
6

## 第三十天：據說今天得完賽了的週四

### 5 則留言

0

iT邦大師 1 級 ‧ 2020-10-15 21:31:48

0

iT邦新手 4 級 ‧ 2020-10-15 21:34:16

0

iT邦大神 1 級 ‧ 2020-10-15 21:38:04

``````//Make Karel fill the world
//with beepers
function main() {
putBeeperLine();
while(leftIsClear()){
reset();
moveUp();
putBeeperLine();
}

}

function putBeeperLine(){
putBeeper();
while(frontIsClear()) {
move();
putBeeper();
}
}

function turnAround(){
turnLeft();
turnLeft();
}

function turnRight(){
turnLeft();
turnLeft();
turnLeft();
}

function reset(){
turnAround();
while(frontIsClear()){
move();
}
turnAround();
}

function moveUp(){
turnLeft();
move();
turnRight();
}
``````

Stanford 就是 Stanford

「找出正方形矩陣的中心點」

fillano iT邦超人 1 級 ‧ 2020-10-15 22:48:13 檢舉

``````//Make Karel fill the world
//with beepers
function main() {
while(frontIsClear()) {
putBeeperLine();
if(leftIsClear()) {
resetLine();
}
}
}

function putBeeperLine(){
putBeeper();
while(frontIsClear()) {
move();
putBeeper();
}
}

function resetLine() {
turnLeft();
turnLeft();
while(frontIsClear()) {
move();
}
turnRight();
move();
turnRight();
}
``````

fillano iT邦超人 1 級 ‧ 2020-10-15 23:00:34 檢舉

0
QQBoxy
iT邦新手 5 級 ‧ 2020-10-16 09:17:57

0

iT邦大師 1 級 ‧ 2020-10-16 10:50:24