def init(self): self.camera = Camera(euclid.Point3(0,15, 0)) self.mainplayer_status = StatusView() self.otherplayer_status = StatusView(is_opponent=True) self.mana_controller = ManaController(self.mainplayer_status.manapool, self.otherplayer_status.manapool, self) self.x_controller = XSelector(self.mainplayer_status.manapool, self.otherplayer_status.manapool, self) self.card_selector = CardSelector(self.mainplayer_status, self.otherplayer_status, self) #self.game_status = GameStatus() self.phase_status = PhaseStatus() self.phase_bar = PhaseBar() self.phase_controller = PhaseController(self.phase_status, self) self.status_controller = StatusController(self.mainplayer_status, self.otherplayer_status, self.phase_status, self) self.selection = SelectionList() self.list_selector = SelectController(self.selection, self) self.msg_dialog = MessageDialog() self.msg_controller = MessageController(self.msg_dialog, self) self.table = Table() self.mainplay = PlayView(z=3) self.otherplay = PlayView(z=-3, is_opponent_view=True) self.play_controller = PlayController(self.mainplay, self.otherplay, self) self.damage_assignment = DamageSelector(self.mainplay, self.otherplay, self) self.distribution_assignment = DistributionSelector(self.mainplay, self.otherplay, self) self.player_hand = HandView() self.hand_controller = HandController(self.player_hand, self) self.otherplayer_hand = HandView(is_opponent=True) self.otherhand_controller = HandController(self.otherplayer_hand, self) self.stack = StackView() self.stack_controller = StackController(self.stack, self) self.zone_animator = ZoneAnimator(self) self._keep_priority = False self.finish_turn = False self.p1_stop_next = False self.p2_stop_next = False
def __init__(self, width, height): pygame.font.init() pygame.display.set_caption("Kobold Mastermind") self.font = pygame.font.Font("snesfont.ttf", 40) self.WIDTH = width self.HEIGHT = height self.screen = pygame.display.set_mode((self.WIDTH, self.HEIGHT)) self.menu = MenuView(300, 200, self.screen, self.WIDTH, self.HEIGHT, self.font) self.play = PlayView(self.screen, self.WIDTH, self.HEIGHT, self.font) self.win = WinView(300, 150, self.screen, self.WIDTH, self.HEIGHT, self.font)
def __init__(self, main_window, *args, **kwargs): super(ContentFrame, self).__init__(*args, **kwargs) self.layout = QtWidgets.QStackedLayout() self.main_window = main_window self.design_view = DesignView(main_window) self.save_view = FileView(main_window, self.design_view, self.main_window.model, True) self.load_view = FileView(main_window, self.design_view, self.main_window.model, False) self.play_view = PlayView(main_window, self.design_view.process_editor) self.contacts_view = ContactsView(main_window) self.settings_view = SettingsView(main_window) self.info_view = QtWidgets.QFrame() self.layout.addWidget(self.design_view) self.layout.addWidget(self.save_view) self.layout.addWidget(self.load_view) self.layout.addWidget(self.play_view) self.layout.addWidget(self.contacts_view) self.layout.addWidget(self.settings_view) self.layout.addWidget(self.info_view) self.setLayout(self.layout)