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 voidnewRound(State start)Method called at the start of a roundActionplayCard(Card c)Perform an action after drawing a card from the deckvoidsee(Action act, State results)Method called when any agent performs an action.java.lang.StringtoString()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:
playCardin 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.
-
-