From 0fc367f200b8e76a7ed147b78a35801d79ceb415 Mon Sep 17 00:00:00 2001 From: Frederic Date: Tue, 20 Dec 2016 12:35:54 +0100 Subject: [PATCH] do not clear the entire frame when paining the playground --- ttrs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ttrs.py b/ttrs.py index eea72ce..e98d646 100755 --- a/ttrs.py +++ b/ttrs.py @@ -169,9 +169,9 @@ class Playground(): return True def paint(self, frame, xpos, ypos): - for x in range(frame.dimension.width): - for y in range(frame.dimension.height): - frame.setPixel(x, y, (0, 0, 0)) + for x in range(self.width): + for y in range(self.height): + frame.setPixel(xpos + x, ypos + y, (0, 0, 0)) for b in set.union(self.blocks, *[ m.blocks for m in self.minos ]): frame.setPixel(xpos + int(b.pos.x), ypos + int(b.pos.y), b.color)