Each player is assigned a mission. By completing the mission the player wins the game.
Missions are, for example:
We built a framework that handles all aspects of the Risk game. It consists of five classes:
Board, which handles the armies on the game board,
Cards, which handles the reinforcement cards of a player,
Mission, which describes the mission of a player,
Player, which makes decisions on how to play, and
Game, which handles all other aspects of the game.
import random random.seed(42)
from board import Board b = Board.create(n_players=4)
We can get a graphical representation of the board using
We can easily manipulate the armies on the board:
b.set_owner(territory_id=0, player_id=5) b.set_armies(territory_id=0, n=15) b.plot_board()