class Main(): def __init__(self, resolution, block_size): self.window_size = resolution self.block_size = block_size self.display = DrawWindow(self.window_size) self.menu = Menu((self.window_size), Eventqueue( self.block_size), self.display) self.game = Game(self.window_size, self.block_size, self.menu) def init_game(self): self.menu.main_menu(self.game)
def main(): player = Tracker(color='blue') game = Game(flag=False) s = Server(handler=game.opponent, host=args.host, sender=args.sender, receiver=args.receiver) screen = game.get_screen() menu = Menu(screen, s.pubsub) menu.main_menu() while True: player.track(show=False) s.send(player.y_loc) game.update(player.y_loc, s.pubsub)