-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
53 lines (35 loc) · 1.04 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from game_color import *
from gui import *
import tkinter as tk
import random
#placar
frame_score(self) = tk.Frame(self)
frame_score.place(relx=0.5, y =60, anchor = "center")
tk.Label(
frame_score,
text = "PLACAR",
font = Game.Font_ScoreLabel
).grid(row=0)
self.label_score = tk.Label(frame_score, text="0", Game.Font_Score)
self.label_score.grid(row=1)
#mecanica jogo
class Game (tk.Frame):
def init_game(self):
tk.Frame.init_game(self)
self.grid()
self.master.title("2048 de Daniel Lourenço Affonso")
self..grid_main = tk.Frame(
self bg = Game.Color_grid, bd= 4, width 600, heigth 600
)
self.GUI_maker()
self.start_game()
self.master.bind("< Esquerda >", self.left)
self.master.bind("< Direita >", self.right)
self.master.bind("< Baixo ", self.down)
self.master.bind("< Cima >", self.up)
self.mainloop()
def start_game():
self.matrix[[0]*4 for in_range(4)]
row = self
matrix_row = []
matrix_line= []