A B C D E G H I K L M N P R S T U V
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- Action - Class in loveletter
-
An abstract class to represent actions in the game LoveLetter.
- Agent - Interface in loveletter
-
An interface for representing an agent in the game Love Letter All agent's must have a 0 parameter constructor
- agents - package agents
B
C
- card() - Method in class loveletter.Action
-
the card of the action
- Card - Enum in loveletter
-
An enumeration of the card types Cards are immutable
- count() - Method in enum loveletter.Card
- COUNTESS - loveletter.Card
D
- deal() - Static method in enum loveletter.Card
-
Creates a shuffled deck of cards, using a default random number generator
- deal(Random) - Static method in enum loveletter.Card
-
Creates a shuffled deck of cards
- deckSize() - Method in class loveletter.State
-
gives the remaining size of the deck, including the burnt card
- drawCard() - Method in class loveletter.State
-
Draws a card for a player from the shuffled deck.
E
- eliminated(int) - Method in class loveletter.State
-
returns true if the nominated player is eleiminated in the round
G
- gameOver() - Method in class loveletter.State
- gameWinner() - Method in class loveletter.State
- getCard(int) - Method in class loveletter.State
-
get the card of the specified player, if known.
- getDiscards(int) - Method in class loveletter.State
-
returns an iterator to go through a players discard pile, from most recent to earliest.
- getPlayerIndex() - Method in class loveletter.State
-
returns the index of the observing player, or -1 for perfect information
- GUARD - loveletter.Card
- guess() - Method in class loveletter.Action
-
the announced guess for 1 cards
H
- handmaid(int) - Method in class loveletter.State
-
helper method to determine if the nominated player is protected by the handmaid
- HANDMAID - loveletter.Card
I
- IllegalActionException - Exception in loveletter
-
A class for representing Illegal Actions in the game Love Letter
- IllegalActionException(String) - Constructor for exception loveletter.IllegalActionException
K
L
- legalAction(Action, Card) - Method in class loveletter.State
-
Checks to see if an action is legal given the current state of the game, for an agent who has just drawn a card.
- loveletter - package loveletter
- LoveLetter - Class in loveletter
-
A class for running a single game of LoveLetter.
- LoveLetter() - Constructor for class loveletter.LoveLetter
-
Constructs a LoveLetter game.
- LoveLetter(long, PrintStream) - Constructor for class loveletter.LoveLetter
-
Constructs a LoveLetter game.
M
- main(String[]) - Static method in class loveletter.LoveLetter
-
This main method is provided to run a simple test game with provided agents.
N
- newRound() - Method in class loveletter.State
-
Resets state for a new round, with new deck of cards, and everyone's hand and discards reset.
- newRound(State) - Method in class agents.RandomAgent
-
Method called at the start of a round
- newRound(State) - Method in interface loveletter.Agent
-
Method called at the start of a round
- nextPlayer() - Method in class loveletter.State
-
Gives the next player to play in the round
- numPlayers() - Method in class loveletter.State
-
Gives the number of players in the game
P
- playBaron(int, int) - Static method in class loveletter.Action
-
Constructs a BARON action for the player challenging another player.
- playCard(Card) - Method in class agents.RandomAgent
-
Perform an action after drawing a card from the deck
- playCard(Card) - Method in interface loveletter.Agent
-
Perform an action after drawing a card from the deck
- playCountess(int) - Static method in class loveletter.Action
-
Constructs a COUNTESS action for the player.
- player() - Method in class loveletter.Action
-
The player who did the action
- playerState(int) - Method in class loveletter.State
-
Produces a state object for a player in the game.
- playGame(Agent[]) - Method in class loveletter.LoveLetter
-
Plays a game of LoveLetter
- playGuard(int, int, Card) - Static method in class loveletter.Action
-
Constructs a GUARD action from the player guessing the targets card.
- playHandmaid(int) - Static method in class loveletter.Action
-
Constructs a HANDMAID action for the player.
- playKing(int, int) - Static method in class loveletter.Action
-
Constructs a KING action for the player requiring swapping cards with the target.
- playPriest(int, int) - Static method in class loveletter.Action
-
Constructs a PRIEST action for the player seeing the targets card.
- playPrince(int, int) - Static method in class loveletter.Action
-
Constructs a PRINCE action for the player requiring the targetted player to discard their card and draw a new one.
- playPrincess(int) - Static method in class loveletter.Action
-
Constructs a PRINCESS action for the player.
- PRIEST - loveletter.Card
- PRINCE - loveletter.Card
- PRINCESS - loveletter.Card
R
- RandomAgent - Class in agents
-
An interface for representing an agent in the game Love Letter All agent's must have a 0 parameter constructor
- RandomAgent() - Constructor for class agents.RandomAgent
- roundOver() - Method in class loveletter.State
-
Tests to see if the round is over, either by all but one player being eleiminated or by all but one card being drawn from the deck.
- roundWinner() - Method in class loveletter.State
-
helper method to determine the winner of the round.
S
- score(int) - Method in class loveletter.State
- see(Action, State) - Method in class agents.RandomAgent
-
Method called when any agent performs an action.
- see(Action, State) - Method in interface loveletter.Agent
-
Method called when any agent performs an action.
- State - Class in loveletter
-
This class represents the observable state of the game.
- State(Random, Agent[]) - Constructor for class loveletter.State
-
Default constructor to build the initial observed state for a player First player in the array will always start
T
- target() - Method in class loveletter.Action
-
the target of the action for 1,2,3,5,6 cards
- toString() - Method in class agents.RandomAgent
-
Reports the agents name
- toString() - Method in class loveletter.Action
- toString() - Method in interface loveletter.Agent
-
Reports the agents name
- toString() - Method in enum loveletter.Card
- toString(String, String) - Method in class loveletter.Action
-
produces a string representation of the action
U
- unseenCards() - Method in class loveletter.State
-
returns an array of the remaining cards that haven't been played yet.
- update(Action, Card) - Method in class loveletter.State
-
Executes the given action of a player.
V
- value() - Method in enum loveletter.Card
- valueOf(String) - Static method in enum loveletter.Card
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum loveletter.Card
-
Returns an array containing the constants of this enum type, in the order they are declared.
All Classes All Packages