def turn_around():
turn_left()
turn_left()
# 환경설정 ------------------
def put_tokens():
## 토큰 양 끝에 두기 ----
put()
while front_is_clear():
move()
put()
## 제자리 돌아오기 -----
turn_around()
while front_is_clear():
move()
turn_around()
put_tokens()
# 토큰 이동 ------------------
def pick_and_put():
take()
move()
put()
move()
def move_left_to_right():
if object_here():
pick_and_put()
while not object_here():
move()
def move_right_to_left():
turn_around()
if object_here():
pick_and_put()
while not object_here():
move()
def move_left_right_tokens() :
move_left_to_right()
move_right_to_left()
turn_around()
move_left_right_tokens()
move_left_right_tokens()
move_left_right_tokens()
move_left_right_tokens()