コード例 #1
0
ファイル: storm3_en.py プロジェクト: alexzeng2014/reeborg
def go_to_next_row():
    turn_left()
    move()
    turn_left()
    while not wall_in_front():
        move()
    turn_around()
コード例 #2
0
ファイル: storm2_en.py プロジェクト: wrata/reeborg
def go_to_next_row():
    turn_left()
    move()
    turn_left()
    while not wall_in_front():
        move()
    turn_around()
コード例 #3
0
def reposition_one():
    turn_around()
    move()
    move()
    move()
    move()
    turn_left()
    move()
    move()
    turn_left()
コード例 #4
0
        turn_right()
        move_x(2)


def down_3_steps():
    for r in range(0, 3):
        move_x(2)
        turn_left()
        move()
        turn_right()


take()
up_3_steps()
put()
turn_around()
down_3_steps()


################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_right():
    for r in range(0, 3):
        turn_left()


def move_x(x):
    for x in range(0, x):
        move()
コード例 #5
0
def corner():
    turn_right()
    move()
    turn_left()
    move()
    turn_around()
コード例 #6
0
ファイル: storm3_en.py プロジェクト: alexzeng2014/reeborg
            
def go_to_next_row():
    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()