Package agents
Class RandomAgent
- java.lang.Object
-
- agents.RandomAgent
-
-
Constructor Summary
Constructors Constructor Description RandomAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
newRound(State start)
Method called at the start of a roundAction
playCard(Card c)
Perform an action after drawing a card from the deckvoid
see(Action act, State results)
Method called when any agent performs an action.java.lang.String
toString()
Reports the agents name
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Reports the agents name
-
newRound
public void newRound(State start)
Method called at the start of a round
-
playCard
public Action playCard(Card c)
Perform an action after drawing a card from the deck- Specified by:
playCard
in interfaceAgent
- Parameters:
c
- the card drawn from the deck- Returns:
- the action the agent chooses to perform
- Throws:
IllegalActionException
- when the Action produced is not legal.
-
-