Class Tableau

java.lang.Object
  extended by CardPile
      extended by Tableau
All Implemented Interfaces:
ICardPile, IGuiPileModel

public class Tableau
extends CardPile

The tableau class contains the state of a tableau (the cards it holds, the size) by using a Stack to hold the cards. A stack is a good implementation for this object because you cannot move a card in the tableau without first moving the bottom card.

Author:
Arup Banerjee, Robert Buechler, Oriana Lisker, Patrick Paczkowski

Constructor Summary
Tableau()
           
 
Method Summary
 boolean isAddable(Card card)
          Checks to see if adding a card to this tableau is a legal move.
static void main(java.lang.String[] args)
          Main method, checks whether there are bugs in class
 
Methods inherited from class CardPile
addCard, clear, dealCard, forceAddCard, getCard, getMaxSize, getPileID, getSize, getSuit, getVisibleCard, isEmpty, isFull, isRemovable, isSameSuit, maxVisibleCount, removeCard, setID, setMaxSize, setSuit, setView, update, visibleCardCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tableau

public Tableau()
Method Detail

isAddable

public boolean isAddable(Card card)
Checks to see if adding a card to this tableau is a legal move.

Specified by:
isAddable in interface ICardPile
Overrides:
isAddable in class CardPile
Parameters:
card - the card to be added
Returns:
Whether or not it is legal to add the card to this tableau

main

public static void main(java.lang.String[] args)
Main method, checks whether there are bugs in class