---------------------------------------
How to add a new AI to an existing game
---------------------------------------


1. Create new AI class
----------------------

* your new class has to extend the "GridAbstractAI" class from the
  "games.strategy.grid.player" package
* one instance of this class will be created at the start of the game
  for each player that uses this AI. 
* the constructor of your class should take two strings as parameters
  (name and type) and forward them to the super constructor. Of course
  you can add additional parameters if you want.
* you will have to override the abstract method "play()".
  This method is called by the engine each time your AI is up to make
  a move. This is where we will define our new AI's behaviour


2. Define the behaviour of your new AI
--------------------------------------

* in the "play()" method, you can access the current state of the
  game with the "getGameData()" method. The object it returns contains
  all relevant information about the running game, including current
  state of the board, history of previous moves, etc.
* to find out which player is controlled by this instance of your class
  you can use the "getPlayerID()" method.
* now write some code that uses this data to find a new move


3. Tell the engine to execute your play
---------------------------------------

* note that you can't alter the current GameData directly, changes can
  only be made by a delegate
* in order to communicate with the delegate, you will need a GridPlayData
  object that represents your play. The GridPlayData class has multiple
  constructors, choose one that fits the game
* to get the current play delegate, use the methods
  "getPlayerBridge().getRemoteDelegate()"
* to make a play, you have to call the "play" method of the current
  delegate, which takes the IGridPlayData object as an argument
* before you tell the delegate to make the play, you might want to call
  "pause()". This let's the engine wait for a few milliseconds, giving
  the user the impression of a thinking opponent
* if the play delegate decides your play is not valid, it will return an
  error string. Be sure to check for this case


4. Making your new AI selectable in the UI
------------------------------------------

* when you start a new game in TripleA, you can choose the AI that
  controls a player from a list. The contents of that list are defined
  in the game's loader class (the class that is defined in the games XML)
* more specifically, the list is defined by the two methods
  "createPlayers" and "getServerPlayerTypes"
  modify these methods accordingly to add your new AI to the game.
  In the "getServerPlayerTypes" method, just add the name of your AI to
  the array that is returned. These strings are the different types of
  players that can be selected in the list later.
  The "createPlayers" method gets a mapping of player names to player
  types as a parameter. For example in a chess game an entry might be
  ("white","Human"). The method should iterate over all map entries and
  create a set of IGamePlayer instances accordingly. In the iteration,
  check if the type string equals the string you added in
  "getServerPlayerTypes" and if it does, create a new instance of your
  AI class with name and type as parameters and add it to the set that
  is returned.
* alternatively, instead of modifying the class you can also define a new
  class that extends it, just override the two methods and specify your
  new class as the game loader in the XML