import gettext
-import whrandom
+import random
class Hextris:
def __init__(self):
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:
win.connect("key-press-event", self.key_handler)
self.init_board()
- whrandom.seed()
+ random.seed()
self.update_appbar()
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]