From c9a90b594752c70dba8326e0783c8007e7bd66f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 20 Jul 2017 15:11:47 +0200 Subject: Fix score --- turtetris_master/game.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/turtetris_master/game.py b/turtetris_master/game.py index 7817ff9..6ecd80e 100644 --- a/turtetris_master/game.py +++ b/turtetris_master/game.py @@ -123,9 +123,14 @@ class Game: i = self.score % 5 y = int(self.score / 5) for ii in range(i): - self.matrix.pixel(self.matrix.width - 1, ii, 'green') - for yy in range(y): - self.matrix.pixel(self.matrix.width - 2, yy, 'green') + if ii < i: + self.matrix.pixel(self.matrix.width - 1, ii, 'green') + else: + self.matrix.pixel(self.matrix.width - 1, ii, 'black') + if ii < y: + self.matrix.pixel(self.matrix.width - 2, ii, 'green') + else: + self.matrix.pixel(self.matrix.width - 2, ii, 'black') def __place__(self): "Stone can't move so place it, check lines and generate new one" -- cgit v1.2.3