From: Christoph Egger Date: Sun, 5 Jul 2015 13:41:50 +0000 (+0200) Subject: whrandom -> random X-Git-Tag: 0.9.1~2 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=8482b6123f92eded940a28ca45aeeefdd0e2c9fb;p=ghextris.git whrandom -> random --- diff --git a/ghextris.py b/ghextris.py index 8b29920..0216a84 100755 --- a/ghextris.py +++ b/ghextris.py @@ -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]