diff options
author | Karel Kočí <karel.koci@nic.cz> | 2017-07-19 14:58:24 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2017-07-19 15:05:43 +0200 |
commit | 89e09de5e12744f9435b6f31fa2e9f7116fc6347 (patch) | |
tree | 46c91fa193478a3b935110caeabd50ea42a9dd26 /turtetris_master/screen_checker.py | |
parent | b934596cfd5415ce83b5a7b42120e0f0e229937a (diff) | |
download | turris-tetris-89e09de5e12744f9435b6f31fa2e9f7116fc6347.tar.gz turris-tetris-89e09de5e12744f9435b6f31fa2e9f7116fc6347.tar.bz2 turris-tetris-89e09de5e12744f9435b6f31fa2e9f7116fc6347.zip |
Add statemachine and empty game class
Diffstat (limited to 'turtetris_master/screen_checker.py')
-rw-r--r-- | turtetris_master/screen_checker.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/turtetris_master/screen_checker.py b/turtetris_master/screen_checker.py index d8ed327..508db1b 100644 --- a/turtetris_master/screen_checker.py +++ b/turtetris_master/screen_checker.py @@ -12,6 +12,7 @@ class ScreenChecker: self.__pos__[i][1] = i for y in range(0, i): matrix.pixel(i, y, 'green') + matrix.display() def __pos_inc__(self, p): p += 1 @@ -21,13 +22,11 @@ class ScreenChecker: def tick(self): self.__tick__ += 1 - if self.__tick__ > 60: + if self.__tick__ > 15: self.__tick__ = 0 for i in range(0, self.matrix.height): self.matrix.pixel(self.__pos__[i][0], i, '000000') self.__pos__[i][0] = self.__pos_inc__(self.__pos__[i][0]) self.__pos__[i][1] = self.__pos_inc__(self.__pos__[i][1]) self.matrix.pixel(self.__pos__[i][1], i, color='green') - return True - else: - return False + self.matrix.display() |