diff --git a/main.py b/main.py index 7959d07a5b8bdd8a4e9fc6bbb14d7aa7b62ee800..7c3b0c7e44aa2f183abcdd07a594c5f40b0371ca 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,4 @@ # Port of this pygame tetris https://gist.github.com/silvasur/565419 -# -# # Copyright (c) 2010 "Laria Carolin Chabowski"<me@laria.me> # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -205,6 +203,12 @@ class TetrisApp(Application): def draw(self, ctx: Context) -> None: # Paint the background black ctx.rgb(0, 0, 0).rectangle(-120, -120, 240, 240).fill() + ctx.scale(2, 2).translate(-25, -50) + ctx.rgb(1, 1, 1).rectangle(0, 0, self.width, self.height).stroke() + + # abc w 0 x 2 0 -100 + # def 0 h y 0 2 -100 + # ghi 0 0 1 0 0 1 if self.gameover: ctx.text_align = ctx.CENTER @@ -242,7 +246,7 @@ class TetrisApp(Application): self.input.think(ins, delta_ms) if self.input.buttons.app.middle.pressed: - self.rotate_stone + self.rotate_stone() elif self.input.buttons.app.left.pressed: self.move(-1) elif self.input.buttons.app.right.pressed: