Example #1
0
class AddPlayersController:
    def __init__(self):
        self.view = PlayerOptionView()

    def __call__(self, store):
        self.view.diplay_players_list("players")
        return TournamentController()
Example #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()
Example #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()
Example #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()
Example #5
0
 def __init__(self):
     self.view = PlayerOptionView()
Example #6
0
 def __init__(self):
     self.view = PlayerOptionView()
     self.data = PlayerData()