Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from robot import *
- Case1=0
- Case2=1000
- Case3=1000
- Case4=1000
- Case5=1000
- for x in range(100):
- Case1= nombreCase()
- for x in range(4):
- if obstacleDevant():
- tournerGauche()
- else:
- avancer()
- if Case2==1000:
- Case2=nombreCase()
- else:
- if Case3==1000:
- Case3= nombreCase()
- else:
- if Case4== 1000:
- Case4= nombreCase()
- else:
- if Case5==1000:
- Case5=nombreCase()
- tournerGauche()
- tournerGauche()
- avancer()
- tournerGauche()
- tournerGauche()
- tournerGauche()
- if Case1 < Case2 and Case1 < Case3 and Case1 < Case4 and Case1<Case5:
- peindre()
- Case2 = 1000
- Case3 = 1000
- Case4 = 1000
- Case5 = 1000
- while obstacleDevant():
- tournerGauche()
- else:
- avancer()
- else:
- Case2 = 1000
- Case3 = 1000
- Case4 = 1000
- Case5 = 1000
- while obstacleDevant():
- tournerDroite()
- else:
- avancer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement