def test_gameboard(game_schema_file): # we use this function for testing various things. Make sure to leave it commented, since otherwise, circular import dependencies will be introduced. from monopoly_simulator import initialize_game_elements from monopoly_simulator import background_agent_v3 from monopoly_simulator import simple_decision_agent_1 from monopoly_simulator.agent import Agent player_decision_agents = dict() player_decision_agents['player_1'] = Agent(**background_agent_v3.decision_agent_methods) player_decision_agents['player_2'] = Agent(**background_agent_v3.decision_agent_methods) player_decision_agents['player_3'] = Agent(**background_agent_v3.decision_agent_methods) player_decision_agents['player_4'] = Agent(**background_agent_v3.decision_agent_methods) game_schema = json.load(open(game_schema_file, 'r')) game_elements_orig = initialize_game_elements.initialize_board(game_schema, player_decision_agents) # pprint.pprint(game_elements_orig,indent=4) player_decision_agents2 = dict() player_decision_agents2['player_1'] = simple_decision_agent_1.decision_agent_methods player_decision_agents2['player_2'] = simple_decision_agent_1.decision_agent_methods player_decision_agents2['player_3'] = simple_decision_agent_1.decision_agent_methods player_decision_agents2['player_4'] = background_agent_v3.decision_agent_methods hypothetical_gameboard = initialize_hypothetical_universe(game_elements_orig,player_decision_agents2) print(hypothetical_gameboard['history']) game_elements_copy = copy.deepcopy(hypothetical_gameboard)
def set_up_board(game_schema_file_path, player_decision_agents): game_schema = json.load(open(game_schema_file_path, 'r')) return initialize_game_elements.initialize_board(game_schema, player_decision_agents)