def update_game(self, pickled_game): print "updated" try: game = pickle.loads(pickled_game) except: print "error unpickling game" return casting_hexes_dict = {} for p_id in game.players.iterkeys(): casting_hexes_dict[p_id] = game.board.get_valid_casting_hexes(game.players[p_id]) self.update_board(game.board) self.update_simulator(Card.get_all_cards_list(), casting_hexes_dict)