24 lines
720 B
Python
24 lines
720 B
Python
from diplomacy import Game
|
|
|
|
def research():
|
|
game = Game()
|
|
print(f"Current Phase: {game.phase}")
|
|
print(f"Powers: {list(game.powers.keys())}")
|
|
|
|
# Check powers and units
|
|
for power_name, power in game.powers.items():
|
|
print(f"Power: {power_name}, Centers: {power.centers}, Units: {power.units}")
|
|
|
|
# Check serialization
|
|
# Game objects have a to_dict method or similar?
|
|
# Let's inspect the object
|
|
print("\nAttributes of Game object:")
|
|
print([attr for attr in dir(game) if not attr.startswith('_')])
|
|
|
|
# Example of setting orders
|
|
# game.set_orders('FRANCE', ['A MAR H', 'A PAR - BUR', 'F BRE - MAO'])
|
|
# game.process()
|
|
|
|
if __name__ == "__main__":
|
|
research()
|