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>syjsmk
No edit summary
 
imported>syjsmk
No edit summary
Line 1: Line 1:
ㄱㄷㅇㄹ
== 미로찾기 ==
def checkLeft():
    if left_is_clear():
        turn_left()
        move()
    elif front_is_clear():
        move()
    elif right_is_clear():
        turn_right()
        move()
    else :
        turn_left()
        turn_left()
        move()
       
while on_beeper:
    checkLeft()
    if on_beeper():
        turn_off()
turn_off()



Revision as of 09:17, 29 June 2011

미로찾기

def checkLeft():
    if left_is_clear():
        turn_left()
        move()
    elif front_is_clear():
        move()
    elif right_is_clear():
        turn_right()
        move()
    else :
        turn_left()
        turn_left()
        move()
        
while on_beeper:
    checkLeft()
    if on_beeper():
        turn_off()
turn_off()