-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecommender.py
58 lines (52 loc) · 1.62 KB
/
Recommender.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
54
55
56
57
58
"""
Copyright 2022 Patrick Müller
Recommender-System
"""
from recommender_system import Recommender
from user_interface import *
state = 0
previous_state = 0
recommender = Recommender()
g = GUI(recommender, False)
g.init_all()
g.root.mainloop()
# while state != -1:
# while state == 0:
# # start menu
# g.init_all()
# previous_state = 0
# state = 1
# if state == 1 and previous_state == 0:
# # g.init_canvas()
# # g.update_canvas()
# # g.next_tetrimino()
# # g.init_score()
# # g.root.bind("<Up>", g.event_handler)
# # g.root.bind("x", g.event_handler)
# # g.root.bind("<Right>", g.event_handler)
# # g.root.bind("<Left>", g.event_handler)
# # g.root.bind("<Down>", g.event_handler)
# # g.root.bind("<space>", g.event_handler)
# # g.root.bind("<Escape>", g.event_handler)
# previous_state = 1
# while state == 1:
# # game active
# # while loop for player control and delay
# # timeout = time() + (0.8 - (game.level - 1) * 0.007)**(game.level - 1)
# # while True:
# # g.update_canvas()
# # g.update_score()
# # g.root.update_idletasks()
# # g.root.update()
# # if time() > timeout:
# # break
# # if game.move_down() is False:
# # game.spawn_tetrimino()
# # game.line_is_full()
# # if game.is_lost():
# # state = -1
# # break
# # g.update_canvas()
# # g.update_score()
# g.root.update_idletasks()
# g.root.update()