-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
35 lines (30 loc) · 1.13 KB
/
main.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
'''
Ce fichier est le fichier principal.
Il utilise le 'Router' et les 8 'Controllers' pour générer,
afficher, interagir avec la base de donnée.
'''
from package.component.router import Router
from package.MVC.controllers.home import ControllerHome
from package.MVC.controllers.player import ControllerPlayer
from package.MVC.controllers.tournament import ControllerTournament
from package.MVC.controllers.tournament_register import ControllerTournamentRegister
from package.MVC.controllers.tournament_play import ControllerTournamentPlay
from package.MVC.controllers.tournament_over import ControllerTournamentOver
from package.MVC.controllers.tournament_new import ControllerTournamentNew
from package.MVC.controllers.report import ControllerReport
controllers = (
ControllerHome(),
ControllerPlayer(),
ControllerTournament(),
ControllerTournamentRegister(),
ControllerTournamentPlay(),
ControllerTournamentOver(),
ControllerTournamentNew(),
ControllerReport(),
)
action = ''
router = Router()
while True:
router.routed(controllers, action)
action = router.ask
quit() if action.upper() == 'Q' else None