diff options
| author | Karel Kočí <karel.koci@nic.cz> | 2017-07-19 19:56:09 +0200 |
|---|---|---|
| committer | Karel Kočí <karel.koci@nic.cz> | 2017-07-19 20:57:52 +0200 |
| commit | ebe88b130fa830b572f83a7fb7ac190a37f70c7c (patch) | |
| tree | 25e79c5e20c021041a459c4eda6f237ffe8e1469 /turtetris_master/led_output.py | |
| parent | 196b6c24a52bb4fc4bb1cb03f2aa6b314e46bf7c (diff) | |
| download | turris-tetris-ebe88b130fa830b572f83a7fb7ac190a37f70c7c.tar.gz turris-tetris-ebe88b130fa830b572f83a7fb7ac190a37f70c7c.tar.bz2 turris-tetris-ebe88b130fa830b572f83a7fb7ac190a37f70c7c.zip | |
Implement game
Diffstat (limited to 'turtetris_master/led_output.py')
| -rw-r--r-- | turtetris_master/led_output.py | 6 |
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) |
