|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectrolec.Player
public class Player
This card represents a Player in the game of Frank's Zoo
| Constructor Summary | |
|---|---|
Player(int i,
AI a,
GameHistory h)
Constructs a new Player |
|
| Method Summary | |
|---|---|
Player |
clone()
Clones this player |
Player |
clone(AI a)
Clones this player with a specific AI |
void |
dealCard(Card c)
Deals a card to the player |
void |
endGame(boolean simulation)
|
int[] |
getCards()
Returns an array representing the player hand. |
GameHistory |
getHistory()
Returns the GameHistory of the player |
int |
getID()
Returns the ID of this player |
java.util.Vector |
getMoves(Move m)
Returns all possible moves to be played in response to a specific move. |
int |
hasJoker()
Returns the ID of the joker |
int |
numberOfCards()
Returns the number of cards in the hand of the player |
boolean |
out()
Indicates whether this player has played all of his cards |
void |
printHand()
Prints the player hand |
Move |
selectMove(Move move,
boolean simulation)
Selects a move in response to a specific move |
java.lang.String |
toString()
Returns a String representation of this Player |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Player(int i,
AI a,
GameHistory h)
i - the player IDa - the AI used by the playerh - the GameHistory| Method Detail |
|---|
public int getID()
public GameHistory getHistory()
public void dealCard(Card c)
c - the card dealt to the playerpublic int numberOfCards()
public int[] getCards()
public boolean out()
public void printHand()
public int hasJoker()
public java.util.Vector getMoves(Move m)
m - the move to respond to
public Move selectMove(Move move,
boolean simulation)
move - the move to respond to
public java.lang.String toString()
toString in class java.lang.Objectpublic Player clone()
clone in class java.lang.Objectpublic void endGame(boolean simulation)
public Player clone(AI a)
a - the AI of the cloned player
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||