Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

데블스캠프2011/셋째날/RUR-PLE/변형진: Difference between revisions

From ZeroWiki
imported>Kesarr
No edit summary
(Repair batch-0005 pages from live compare)
 
Line 9: Line 9:
   
   
  harvest_row(6)
  harvest_row(6)
  for num in [5,4,3,2,1]:
  for num in [5,4,3,2,1]:
     harvest_row(num)
     harvest_row(num)
     harvest_row(num)
     harvest_row(num)
Line 37: Line 37:
     move()
     move()
  turn_off()
  turn_off()

Latest revision as of 00:44, 27 March 2026

harvest1.wld

def harvest():
    move()
    pick_beeper()
    
def harvest_row(num):
    repeat(harvest, num)
    turn_left()

harvest_row(6)
for num in [5,4,3,2,1]:
    harvest_row(num)
    harvest_row(num)
turn_off()

trash1.wld

def harvest():
    while front_is_clear():
        move()
        while on_beeper():
            pick_beeper()
            
harvest()
repeat(turn_left, 2)
harvest()
repeat(turn_left, 3)
move()
while carries_beepers():
    put_beeper()
turn_off()

maze.wld

while not on_beeper():
    repeat(turn_left, 3)
    while not front_is_clear():
        turn_left()
    move()
turn_off()