Python Library
from catanatron import Game, RandomPlayer, Color
# Play a simple 4v4 game
players = [
RandomPlayer(Color.RED),
RandomPlayer(Color.BLUE),
RandomPlayer(Color.WHITE),
RandomPlayer(Color.ORANGE),
]
game = Game(players)
print(game.play()) # returns winning colorIterating Over Plys (ticks)
game = Game(players)
while game.winning_color() is None:
print(game.state)
action = game.play_tick()
print(action)Debugging Game State
Last updated