More actions
imported>syjsmk No edit summary |
(Repair batch-0005 pages from live compare) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 19: | Line 19: | ||
turn_off() | turn_off() | ||
turn_off() | turn_off() | ||
==harvest== | == harvest == | ||
def rightHarv(): | def rightHarv(): | ||
repeat(moveAndPick, 6) | repeat(moveAndPick, 6) | ||
| Line 37: | Line 37: | ||
turn_off() | turn_off() | ||
== dance == | |||
def turn_right() : | |||
repeat(turn_left, 3) | |||
def dance(): | |||
repeat(turn_left, 4) | |||
while front_is_clear(): | |||
dance() | |||
move() | |||
while not front_is_clear(): | |||
repeat(turn_right, 3) | |||
move() | |||
turn_off() | |||
Latest revision as of 00:44, 27 March 2026
미로찾기
def checkLeft():
if left_is_clear():
turn_left()
move()
elif front_is_clear():
move()
elif right_is_clear():
turn_right()
move()
else :
turn_left()
turn_left()
move()
while on_beeper:
checkLeft()
if on_beeper():
turn_off()
turn_off()
harvest
def rightHarv():
repeat(moveAndPick, 6)
def leftHarv():
turn_left()
move()
pick_beeper()
turn_left()
repeat(moveAndPick, 6)
turn_right()
move()
turn_right()
i = 0
for i in range(0, 3):
rightHarv()
leftHarv()
turn_off()
dance
def turn_right() :
repeat(turn_left, 3)
def dance():
repeat(turn_left, 4)
while front_is_clear():
dance()
move()
while not front_is_clear():
repeat(turn_right, 3)
move()
turn_off()