U E D R , A S I H C RSS

데블스캠프2005/RUR-PLE/Newspaper/Refactoring


1. 데블스캠프2005/RUR-PLE/Newspaper/Refactoring

1.1. 남도연

~cpp 
def turn_right():
    repeat(turn_left, 3)
#define it.
def floor_up():
    turn_left()
    move()
    turn_right()
    move()
    move()
#define it.
def floor_down():
    move()
    move()
    turn_left()
    move()
    turn_right()
move()
#use it.
repeat(floor_up,4)
put_beeper()
turn_left()
turn_left()
#use it.
repeat(floor_down, 4)
move() 

1.2. 황재선

~cpp 
def turn_right():
    repeat(turn_left, 3)

def upAndGo():
    turn_left()
    move()
    turn_right()
    move()
    move()

def goAndDown():
    move()
    move()
    turn_left()
    move()
    turn_right()

#start

move()
repeat(upAndGo, 4)

put_beeper()

turn_left()
turn_left()

repeat(goAndDown, 3)

move()
turn_off()

1.3. 민경

~cpp 
def turn_right(): 
    turn_left()
    turn_left()
    turn_left()     
 
def move_up(): 
    turn_left() 
    move() 
    turn_right() 
    move() 
    move() 
 
def move_down(): 
    move() 
    move() 
    turn_left() 
    move() 
    turn_right() 
 

move() 
repeat(move_up, 4) 
 
put_beeper() 
 
turn_left() 
turn_left() 
repeat(move_down, 3) 
move() 

turn_off() 
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:58
Processing time 0.0090 sec