ai
Class RandomPlayer
java.lang.Object
   core.Player
core.Player
       ai.RandomPlayer
ai.RandomPlayer
- All Implemented Interfaces: 
- net.antichess.ai.AiPlayer
- public class RandomPlayer 
- extends Player
An ai player that makes random moves.
- Specification Fields :
- state: game state // the current state of the came according to
            the ai
| Constructor Summary | 
| RandomPlayer(Color c)Creates a new random player of the given color
 | 
 
| Method Summary | 
|  Move | askForMove(Move opponentsMove)Gets the next move of the player, given the opponents move.
 | 
|  void | update(Game game)Has the player make a series of moves.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
RandomPlayer
public RandomPlayer(Color c)
- Creates a new random player of the given color
 
- Parameters:
- c- color of the player
- Requires:
- c not null
 
askForMove
public Move askForMove(Move opponentsMove)
- Description copied from class: Player
- Gets the next move of the player, given the opponents move.
 
- 
- Specified by:
- askForMovein class- Player
 
- 
- Parameters:
- opponentsMove- the opponents move
- See Also:
- Player
 
update
public void update(Game game)
- Has the player make a series of moves. Used to get the AI player up to
 speed on a newly loaded game
 
- 
- Specified by:
- updatein class- Player
 
- 
- Parameters:
- game- the new game
- Requires:
- game not null
- Modifies:
- state