-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.py
31 lines (23 loc) · 959 Bytes
/
start.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
from multiprocessing import Process, Manager, freeze_support
def main():
VER = "1.1-prerelease"
gui = GraphicalUserInterface(VER)
world_championships = Bejeweled3WorldChampionships()
with Manager() as manager:
gui_queue = manager.Queue()
action_queue = manager.Queue()
world_championships.gui_queue = gui_queue
world_championships.action_queue = action_queue
gui.gui_queue = gui_queue
gui.action_queue = action_queue
wc = Process(target = world_championships.process_loop, name = "championships")
wc.start()
gui.start()
wc.terminate()
wc.close()
print("World Championships stopped")
if __name__ == "__main__":
freeze_support() # This should make Pyinstaller not launch the program multiple times.
from bj3wc import *
from gui import *
main()