|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCellPiles
public class CellPiles
| Field Summary | |
|---|---|
static int |
NUM_CELLS
|
| Constructor Summary | |
|---|---|
CellPiles()
Given our static int we can generate a certain amount of cell piles |
|
| Method Summary | |
|---|---|
boolean |
addCard(Card card,
int cellNum)
Adds a card to the appropriate cell, the Cell object already checks if the cell is empty or not |
void |
clear()
Clears all the cells, so when you redeal you won't have a problem. |
CardPile[] |
getAllCells()
Returns an array of CardPile objects that represents all of the cells |
Card |
getCard(int cellNum)
In order to make checks on a given card, or to see if a card is available, this method helps you out |
java.util.ArrayList<Card> |
getCards()
Returns all the cards in the cells |
CardPile |
getCell(int num)
Returns the cell at index num |
int |
getNumEmpty()
Gets the number of free cells available to use |
boolean |
isEmpty(int cellNum)
Checks to see if a certain cell is empty or not just in case you want to move other cards into it |
static void |
main(java.lang.String[] args)
|
Card |
removeCard(int cellNum)
Removes a card to the appropriate cell, the Cell object already checks if the cell is empty or not |
void |
update()
Tells the view for each cell to update itself |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NUM_CELLS
| Constructor Detail |
|---|
public CellPiles()
| Method Detail |
|---|
public boolean addCard(Card card,
int cellNum)
card - is the Card Object to add to the cell if emptycellNum - is the cell number to put it in, 0-3public Card removeCard(int cellNum)
cellNum - is the cell number to put it in, 0-3
public int getNumEmpty()
public Card getCard(int cellNum)
cellNum - the Cell you are trying to access
public java.util.ArrayList<Card> getCards()
public boolean isEmpty(int cellNum)
cellNum - the cell number 0-3, that you wanna test
public void clear()
public CardPile getCell(int num)
num - the index of the cell you want
public CardPile[] getAllCells()
public void update()
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||