]> git.siccegge.de Git - ghextris.git/commitdiff
whrandom -> random
authorChristoph Egger <christoph@christoph-egger.org>
Sun, 5 Jul 2015 13:41:50 +0000 (15:41 +0200)
committerChristoph Egger <christoph@christoph-egger.org>
Sun, 5 Jul 2015 13:41:50 +0000 (15:41 +0200)
ghextris.py

index 8b29920504310fc45794d37ab36852c1852e0da7..0216a8437f0614e7889e7a7f7af25450a050459c 100755 (executable)
@@ -36,7 +36,7 @@ import gtk.glade
 
 import gettext
 
-import whrandom
+import random
 
 class Hextris:
     def __init__(self):
@@ -216,7 +216,7 @@ class Hextris:
             self.rowgroups.append(self.board.add("GnomeCanvasGroup", x = 0,
                                                  y = i * self.pieceheight))
         
-        self.nextnum = whrandom.randint(0, 9)
+        self.nextnum = random.randint(0, 9)
         self.next_piece()
 
         if self.running == False:
@@ -277,7 +277,7 @@ class Hextris:
         win.connect("key-press-event", self.key_handler)
         self.init_board()
 
-        whrandom.seed()
+        random.seed()
 
         self.update_appbar()
 
@@ -285,7 +285,7 @@ class Hextris:
 
     def next_piece(self):
         self.piecenum = self.nextnum
-        self.nextnum = whrandom.randint(0, 9)
+        self.nextnum = random.randint(0, 9)
         self.attitude = 0
         self.piece_x = (self.cols/2)-1 + self.deltax[self.piecenum]
         self.piece_y = -3 + self.deltax[self.piecenum]