-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathGameController.py
30 lines (29 loc) · 1.07 KB
/
GameController.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
import os
import logging
from src.Utils import initialize_logging
from src import __version__
import sys
from PyQt5 import QtWidgets
from GameController.GameControllerView import GameControllerWindow
from GameController.GameControllerModel import GameControllerModel
from GameController.GameControllerController import GameControllerController
if __name__ == "__main__":
lvl = logging.INFO # logging.DEBUG
initialize_logging(lvl)
logging.info(f"******** ARCHERO BOT v{__version__} STARTED ********")
logging.info("Stuff is loading, promise it is. Please wait")
logging.info("")
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
MainWindow.setWindowTitle("Game Controller")
data_path = os.path.join(os.getcwd(), "datas")
model = GameControllerModel(data_path)
controller = GameControllerController(model)
ui = GameControllerWindow(model, controller)
ui.setupUi(MainWindow)
model.load_data()
model.check_for_updates()
MainWindow.show()
result = app.exec_()
model.requestClose()
sys.exit(result)