mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
whrandom -> random
This commit is contained in:
parent
b26a1b4e2b
commit
6c3a2cbc52
5 changed files with 12 additions and 12 deletions
|
@ -41,12 +41,12 @@ class Electrons:
|
|||
self.tk.update()
|
||||
|
||||
def random_move(self,n):
|
||||
import whrandom
|
||||
import random
|
||||
c = self.canvas
|
||||
for i in range(1,n+1):
|
||||
p = self.pieces[i]
|
||||
x = whrandom.choice(range(-2,4))
|
||||
y = whrandom.choice(range(-3,4))
|
||||
x = random.choice(range(-2,4))
|
||||
y = random.choice(range(-3,4))
|
||||
c.move(p, x, y)
|
||||
self.tk.update()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue