Advertisement
arkturius

Untitled

Dec 11th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. from robot import *
  2. forms = [0]*13
  3. c = [0]*6
  4. place = 1
  5. p = 0
  6.  
  7. def remonter():
  8.     ramasser()
  9.     haut()
  10.     deposer()
  11.     bas()
  12.    
  13. bas()
  14.  
  15. while surObjet():
  16.     if surObjetPlein():
  17.         if surRond():p = 0
  18.         if surCarre():p = 1
  19.         if surTriangle():p = 2
  20.     if surObjetPoints():
  21.         if surRond():p = 3
  22.         if surCarre():p = 4
  23.         if surTriangle():p = 5
  24.     forms[place-1] = p
  25.     c[p] += 1
  26.     droite()
  27.     place += 1
  28.  
  29. t = c.index(max(c))
  30.  
  31. while place != 1:
  32.     gauche()
  33.     place -= 1
  34.     if forms[place-1] == t:
  35.         remonter()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement