aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2017-07-20 15:11:47 +0200
committerKarel Kočí <karel.koci@nic.cz>2017-07-20 15:11:47 +0200
commitc9a90b594752c70dba8326e0783c8007e7bd66f4 (patch)
tree0917ecce840dc0962ec660f7960d52d91b11958b
parent4231e0fa507e1cc183d30bb5a6c1ba76cdfe8529 (diff)
downloadturris-tetris-c9a90b594752c70dba8326e0783c8007e7bd66f4.tar.gz
turris-tetris-c9a90b594752c70dba8326e0783c8007e7bd66f4.tar.bz2
turris-tetris-c9a90b594752c70dba8326e0783c8007e7bd66f4.zip
Fix score
-rw-r--r--turtetris_master/game.py11
1 files 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"