X-Git-Url: https://git.siccegge.de//index.cgi?p=ghextris.git;a=blobdiff_plain;f=ghextris.py;h=0216a8437f0614e7889e7a7f7af25450a050459c;hp=8b29920504310fc45794d37ab36852c1852e0da7;hb=8482b6123f92eded940a28ca45aeeefdd0e2c9fb;hpb=acb75d5060e68b0483e44b72b58e809555d7fc41 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]