Browse Source

do not clear the entire frame when paining the playground

feature/balanceutils
Fr3deric 8 years ago committed by Frederic
parent
commit
0fc367f200
  1. 6
      ttrs.py

6
ttrs.py

@ -169,9 +169,9 @@ class Playground(): @@ -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)

Loading…
Cancel
Save