|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjagafa.object.CardList
jagafa.object.GoneCardHeap
public class GoneCardHeap
GoneCardHeap is a CardList which holds all Cards that have been played during a Game, including the winners of every turn
| Constructor Summary | |
|---|---|
GoneCardHeap()
Constructor: Init the winner and board Lists |
|
| Method Summary | |
|---|---|
void |
addTurn(Board b,
Player winner)
Adds the turn to the GoneCardHeap |
Board |
getBoard(int turnNr)
|
CardList |
getGoneOfColor(int color)
Dummy method: Used in GoneCardHeap only |
Card |
getPlayedCard(Player player,
Board b)
Get the card a specific Player played on a specific Board |
Player |
getWinner(int turnNr)
|
boolean |
hasPlayedColorIn(Player player,
Board board)
|
boolean |
isGone(Card c)
|
int |
turns()
|
| Methods inherited from class jagafa.object.CardList |
|---|
add, addAll, clear, contains, get, isEmpty, iterator, list, remove, remove, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GoneCardHeap()
| Method Detail |
|---|
public void addTurn(Board b,
Player winner)
b - The turns Board objectwinner - The turns winnerpublic boolean isGone(Card c)
public CardList getGoneOfColor(int color)
CardList
getGoneOfColor in class CardListcolor - The color number
public Board getBoard(int turnNr)
turnNr - The turn number
public Player getWinner(int turnNr)
turnNr - The turn number
public int turns()
public boolean hasPlayedColorIn(Player player,
Board board)
player - The relevant playerboard - The relevant board
public Card getPlayedCard(Player player,
Board b)
player - The relevant playerb - The relevant board
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||