123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- from library import turn_around, turn_right, move_to_wall
-
-
- def clean_room():
- turn_left()
- while front_is_clear():
- turn_right()
- clean_row()
- move_to_next_row()
- turn_right()
- clean_row()
-
-
- def clean_row():
- while front_is_clear():
- clean_cell()
- move()
- clean_cell()
- turn_around()
- move_to_wall()
- turn_around()
-
-
- def clean_cell():
- if object_here():
- take()
-
-
- def move_to_next_row():
- turn_left()
- move()
-
- think(30)
- clean_room()
-
-
- ################################################################
- # WARNING: Do not change this comment.
- # Library Code is below.
- ################################################################
- def turn_right():
- for _ in range(3):
- turn_left()
-
- def turn_around():
- turn_left()
- turn_left()
-
- def move_to_wall():
- while front_is_clear():
- move()
|