Package loveletter
Interface Agent
-
- All Known Implementing Classes:
RandomAgent
public interface Agent
An interface for representing an agent in the game Love Letter All agent's must have a 0 parameter constructor
-
-
Method Summary
All Methods Instance Methods Abstract 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
java.lang.String toString()
Reports the agents name- Overrides:
toString
in classjava.lang.Object
-
newRound
void newRound(State start)
Method called at the start of a round- Parameters:
start
- the initial state of the round
-
see
void see(Action act, State results)
Method called when any agent performs an action.- Parameters:
act
- the action an agent performsresults
- the state of play the agent is able to observe.
-
playCard
Action playCard(Card c)
Perform an action after drawing a card from the deck- 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.
-
-