rolec
Class RandomAI

java.lang.Object
  extended by rolec.RandomAI
All Implemented Interfaces:
AI

public class RandomAI
extends java.lang.Object
implements AI

This class represents an AI which enforces a player to play a random move


Constructor Summary
RandomAI()
          Constructs a new AI that plays random moves
 
Method Summary
 Move selectMove(Move m, Player p, Deck deck, GameHistory history, boolean simulation)
          Selects a move (at random) from the list of possible moves
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAI

public RandomAI()
Constructs a new AI that plays random moves

Method Detail

selectMove

public Move selectMove(Move m,
                       Player p,
                       Deck deck,
                       GameHistory history,
                       boolean simulation)
Selects a move (at random) from the list of possible moves

Specified by:
selectMove in interface AI
Parameters:
m - the move to respond to
p - the player who uses this AI
deck - the deck used in this game
history - the history of the game
Returns:
the move to be played by the specified player as a response to the specified move