Advertisement
Guest User

Untitled

a guest
Feb 20th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. SetPosWords (Prepare phase)
  2. # Import the Python modules:
  3. import random
  4. from openexp.mouse import mouse
  5. from math import sqrt
  6.  
  7. #Create random locations and word list
  8. coords= [[+184, +130], [-100, +172], [+271, -222], [+287, +39], [-87, -39] ]
  9. random.shuffle(coords)
  10. for i in range (1,6):
  11. xvar="x"+str(i)
  12. yvar="y"+str(i)
  13. c =coords.pop()
  14. x=c.pop(0)
  15. y=c.pop()
  16. exp.set(xvar,x)
  17. exp.set(yvar,y)
  18.  
  19. Words= ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
  20. random.shuffle(Words)
  21. for a in range (1,6):
  22. Wordvar="Word"+str(a)
  23. c =Words.pop()
  24. exp.set(Wordvar,c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement