Esempio n. 1
0
class AddPlayersController:
    def __init__(self):
        self.view = PlayerOptionView()

    def __call__(self, store):
        self.view.diplay_players_list("players")
        return TournamentController()
Esempio n. 2
0
class PlayerListController:
    def __init__(self):
        self.view = PlayerOptionView()
        self.data = PlayerData()

    def __call__(self, store):

        self.view.diplay_players_list(store["players"])

        return ReportController()
Esempio n. 3
0
class DeletePlayer:
    def __init__(self):
        self.view = PlayerOptionView()
        self.delete = PlayerData()

    def __call__(self, store):
        self.view.diplay_players_list("players")
        self.delete.delete_player()

        return PlayerController()
Esempio n. 4
0
class CreatePlayerController:
    def __init__(self):
        self.view = PlayerOptionView()
        self.save = PlayerData()

    def __call__(self, store):
        data = self.view.create_player()
        player = Player(**data)
        store["players"].append(player)
        self.save.save_player_data(player)

        return PlayerController()
Esempio n. 5
0
 def __init__(self):
     self.view = PlayerOptionView()
Esempio n. 6
0
 def __init__(self):
     self.view = PlayerOptionView()
     self.data = PlayerData()