Installation

This commit is contained in:
Oliver Hofmann
2024-07-11 19:07:13 +02:00
parent b2162262b7
commit fc53e01f38
16 changed files with 256 additions and 27 deletions
+13
View File
@@ -0,0 +1,13 @@
while front_is_clear():
move()
turn_left()
turn_left()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_around():
turn_left()
turn_left()
+12
View File
@@ -0,0 +1,12 @@
for _ in range(1,10):
if object_here():
take()
move()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_around():
turn_left()
turn_left()
+13
View File
@@ -0,0 +1,13 @@
for i in range(1, 10):
put()
move()
put()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_right():
turn_left()
turn_left()
turn_left()
+24
View File
@@ -0,0 +1,24 @@
def turn_right():
turn_left()
turn_left()
turn_left()
move()
move()
turn_left()
move()
move()
turn_right()
move()
take()
turn_left()
turn_left()
move()
move()
turn_left()
move()
put()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
+14
View File
@@ -0,0 +1,14 @@
from library import turn_right
while wall_on_right():
move()
turn_left()
turn_left()
move()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_right():
for _ in range(3):
turn_left()
+15
View File
@@ -0,0 +1,15 @@
move()
move()
take()
turn_left()
move()
turn_left()
turn_left()
turn_left()
move()
move()
put()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
+51
View File
@@ -0,0 +1,51 @@
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()
@@ -0,0 +1,19 @@
def do_robin():
if object_here():
take()
if not object_here():
put()
while front_is_clear():
do_robin()
move()
do_robin()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_around():
turn_left()
turn_left()
+19
View File
@@ -0,0 +1,19 @@
def do_robin():
if object_here():
take()
else:
put()
while front_is_clear():
do_robin()
move()
do_robin()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_around():
turn_left()
turn_left()
+10
View File
@@ -0,0 +1,10 @@
while front_is_clear():
move()
################################################################
# WARNING: Do not change this comment.
# Library Code is below.
################################################################
def turn_around():
turn_left()
turn_left()