From 4640ed723f53495f8664c55e2264c1d2276c8721 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 19 May 2014 09:58:48 +0900 Subject: [PATCH] Updating preview positioning --- tetris.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tetris.py b/tetris.py index a9ed1eb..539fffe 100755 --- a/tetris.py +++ b/tetris.py @@ -171,8 +171,12 @@ class Game: def new_game(self): - self.board = Board((10, 10), (10, 20), 3, (20, 20)) - self.board_prev = Board((300, 300), (4, 4), 3, (20, 20)) + border_width = 3 + block_dims = 20, 20 + padding = 10 + + self.board = Board((padding, padding), (10, 20), border_width, block_dims) + self.board_prev = Board((self.board.grid_rect.right+padding, padding), (4, 4), border_width, block_dims) self.tetrad = Tetrad.random() self.tetrad_next = Tetrad.random() self.counter = 0