Esempio n. 1
0
def home():
    turn_left()
    move()
    turn_right()
    move_x(2)
    turn_right()
    move()
Esempio n. 2
0
def jump():
    turn_left()
    move()
    turn_right()
    move()
    turn_right()
    move()
    turn_left()
Esempio n. 3
0
def home():
    while object_here():
        take()
    turn_left()
    move()
    turn_right()
    move_x(2)
    turn_right()
    move()
Esempio n. 4
0
def corner():
    turn_right()
    takeobject()
    move()
    turn_left()
    takeobject()
    move()
    turn_around()
    takeobject()
Esempio n. 5
0
def jump():
    turn_left()
    while wall_on_right():
        move()
    turn_right()
    move()
    turn_right()
    while front_is_clear():
        move()
    turn_left()
Esempio n. 6
0
def bypass():
    takeobject()
    turn_right()
    move()
    turn_left()
    move()
    move()
    turn_left()
    move()
    turn_right()
    takeobject()
Esempio n. 7
0
def right():
    while object_here():
        take()
    turn_right()
    if wall_in_front():
        turn_around()
        while front_is_clear():
            move()
        dump()
        #break
    else:
        move()
        turn_right()
Esempio n. 8
0
def draw_zero():  #robot will draw a number zero
    draw_one()
    turn_right()
    move()
    put()
    move()
    turn_right()
    draw_one()
    turn_right()
    move()
    put()
Esempio n. 9
0
    while object_here():
        take()
    if front_is_clear():
        move()
    else:
        if count%2:
            turn = turn_right
        else:
            turn = turn_left
        turn()
        if front_is_clear():
            move()
            turn()
            count += 1
        else:
            turn_right()
            clear_move()
            break
while carries_object():
    put()
turn_back()
clear_move()
turn_left()
clear_move()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def multi_move(count=1):
    for _ in range(count):
        move()
Esempio n. 10
0
def up_3_steps():
    for r in range(0, 3):
        turn_left()
        move()
        turn_right()
        move_x(2)
Esempio n. 11
0
def down_3_steps():
    for r in range(0, 3):
        move_x(2)
        turn_left()
        move()
        turn_right()
Esempio n. 12
0
def right():
    while object_here():
        take()
    turn_right()
    move()
    turn_right()
Esempio n. 13
0
    turn_left()
    move()
    turn_left()
    while not wall_in_front():
        move()
    turn_around()

while True:
    clear_row()
    try:
        go_to_next_row()
    except ReeborgError:
        break
turn_around()
while front_is_clear():
    move()
turn_right()
while front_is_clear():
    move()
turn_right()

move()

while carries_object("leaf"):
    put("leaf")
turn_around()
move()
turn_around()
build_wall()
done()
Esempio n. 14
0
def right():
    for r in range(0, 2):
        turn_right()
        move()