-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
game over screen; decouple main.py from tetris game draw/update logic
- Loading branch information
1 parent
24f0909
commit 2a8015c
Showing
5 changed files
with
77 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pyxel | ||
|
||
from ttris.board import Board | ||
|
||
|
||
class TtrisGame: | ||
def __init__(self) -> None: | ||
self.board = Board(10, 1, 5) | ||
|
||
def update(self) -> None: | ||
self.board.update() | ||
pass | ||
|
||
def draw(self) -> None: | ||
pyxel.cls(0) | ||
self.board.draw() | ||
|
||
def run(self) -> None: | ||
pyxel.run(self.update, self.draw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters