1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 11:28:14 +00:00

game: small fix to 2048

This commit is contained in:
Pavol Rusnak 2018-12-23 13:28:42 +01:00
parent be833053a9
commit 076d1a7e53
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -32,7 +32,7 @@ color = {
class Game:
def __init__(self):
self.d = ui.Display()
self.d = ui.display
self.d.backlight(ui.BACKLIGHT_NORMAL)
self.d.bar(0, 0, ui.WIDTH, ui.HEIGHT, color["0"][1])
self.m = [[0 for _ in range(4)] for _ in range(4)]
@ -81,6 +81,7 @@ class Game:
def update(self, d):
for _ in range(4):
self.compact(d)
self.add()
def compact(self, d):
if d == SWIPE_DOWN:
@ -127,7 +128,6 @@ async def layout_game():
game.render()
swipe = await Swipe(absolute=True)
game.update(swipe)
game.add()
workflow.startdefault(layout_game)