aboutsummaryrefslogtreecommitdiff
path: root/turtetris_master/led_output.py
diff options
context:
space:
mode:
Diffstat (limited to 'turtetris_master/led_output.py')
-rw-r--r--turtetris_master/led_output.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/turtetris_master/led_output.py b/turtetris_master/led_output.py
index 443c44f..1b3c435 100644
--- a/turtetris_master/led_output.py
+++ b/turtetris_master/led_output.py
@@ -29,3 +29,9 @@ class Matrix:
if x < 0 or x > 11 or y < 0 or y > 9:
raise Exception('Pixel out of matrix')
self.__mat__[y][x] = color
+
+ def fill(self, color):
+ "Fill whole matrix with given color"
+ for x in range(self.width):
+ for y in range(self.height):
+ self.pixel(x, y, color)