Warlight API summary

Here are the most important classes, fields and methods in the Warlight API. For more details, read the Javadoc and/or look at the source code.

All fields and methods listed below are public unless noted otherwise.

Player numbers are as follows: 0 = neutral, 1 = player 1, 2 = player 2.

map classes

enum Region

enum Continent

game state classes

enum Phase { STARTING_REGIONS, PLACE_ARMIES, ATTACK_TRANSFER };

class RegionState

class ContinentState

class PlayerState

int player;  // which player this object describes

Map<Region, RegionState> regions;  // all regions this player owns

Map<Continent, ContinentState> continents;  // all continents this player owns

int totalArmies;  // total armies the player has in all controlled regions

int placeArmies;  // number of armies this player can place per round

class GameState

bot classes

interface Action

    A set of commands that form a player's turn and can be applied to a GameState.

class ChooseCommand implements Action

A command to choose a starting region.

class PlaceCommand

A command to place armies at the beginning of a turn.

class PlaceAction implements Action

A set of placement commands.

class MoveCommand

A command to move or attack.

class MoveAction implements Action

A set of movement commands.

class PlaceMoveAction implements Action

An action containing placement and movement commands that can be applied all at once.

abstract class GameBot

utility classes

class FightAttackersResults