|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectrolec.GameHistory
public class GameHistory
This class keep track of all moves played during a game of Frank's Zoo
| Constructor Summary | |
|---|---|
GameHistory(int p,
Deck d,
int[] o)
Constructs a new, empty GameHistory |
|
| Method Summary | |
|---|---|
void |
addMove(Move m)
Adds a move to the GameHistory |
java.util.Vector |
cards()
Returns the cards left in the hands of the players |
int |
cardsLeft()
Returns the total number of cards left in the hands of the Players |
int |
cardsLeftForPlayer(int id)
Returns the total number of cards left in the hands of one specific Player |
int |
cardsLeftOfType(int type)
Returns the total number of cards of one specific type left in the hands of the Players |
int |
cardsPlayed()
Returns the total number of cards played so far during the game |
int |
cardsPlayed(int id,
int type)
Returns the number of cards of one specific type played so far during the game by one specific Player |
int |
cardsPlayedByPlayer(int id)
Returns the number of cards played so far during the game by one specific Player |
int |
cardsPlayedOfType(int type)
Returns the number of cards of one specific type played so far during the game |
GameHistory |
clone()
Returns a cloned instance of the GameHistory |
Deck |
getDeck()
Returns the Deck used in the Game |
java.util.Vector |
getMoves()
Returns the moves played in this game |
int[] |
getOrder()
Returns the order in which players take turns |
int |
playerCount()
Returns the number of players in the Game |
int |
playersOut()
Returns the number of players that are out at the moment |
void |
print()
Prints the GameHistory |
void |
printOrder()
Prints the order in which players take turns |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GameHistory(int p,
Deck d,
int[] o)
p - number of playersd - the Deck of cards used during the game| Method Detail |
|---|
public void addMove(Move m)
m - the Move to be addedpublic int cardsPlayed()
public int cardsPlayedByPlayer(int id)
id - the ID of the Player for which the number of cards played should be returned
public int cardsPlayedOfType(int type)
type - the type of card for which the number of cards played should be returned
public int cardsPlayed(int id,
int type)
id - the the ID of the Player for which the number of cards played should be returnedtype - the type of card for which the number of cards played should be returned
public int cardsLeft()
public java.util.Vector cards()
public int cardsLeftForPlayer(int id)
public int cardsLeftOfType(int type)
public void print()
public java.util.Vector getMoves()
public int playersOut()
public int[] getOrder()
public Deck getDeck()
public void printOrder()
public int playerCount()
public GameHistory clone()
clone in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||