GamePlayer declares some common functions:
This function is called to inform the player that a new game is about to start.
This function is called when a game has ended. The parameter nResult tells the outcome of the game:
Note: There is a possibility that NewGame is called twice, without any game played or EndGame called in between, if for example a player causes an exception during NewGame.
This function is called whenever a player is to make a move. The state parameter contain all necessary information about the game, and the caller expects an legal move to be returned. The return type is a subclass of CommentMove.
Note: All implementations should take into account that multiple instances of a player are created when it's playing against itself.