Interface ICardPile

All Known Implementing Classes:
CardPile, Foundation, Tableau

public interface ICardPile

Card stack interface

Author:
Group 6
ab68 Arup Banerjee
rau Robert Buechler
pp25 Patrick Paczkowski
orl Oriana Lisker

Method Summary
 boolean addCard(Card card)
          Adds a card to stack
 void clear()
          Clears the stack
 Card getCard()
          Gets top card from stack
 boolean isAddable(Card card)
          Checks if card can be added to stack
 boolean isEmpty()
          Checks if stack is empty or not
 boolean isFull()
          Checks if stack is empty or not
 boolean isRemovable()
          Checks if card can be removed from stack
 Card removeCard()
          Removes top card from stack
 

Method Detail

getCard

Card getCard()
Gets top card from stack

Returns:
top card

addCard

boolean addCard(Card card)
Adds a card to stack

Parameters:
card - is the Card Object being added
Returns:
true if card was added successfully to stack, false otherwise

removeCard

Card removeCard()
Removes top card from stack

Returns:
top card

isAddable

boolean isAddable(Card card)
Checks if card can be added to stack

Parameters:
card - is the Card Object being added
Returns:
true if card can be added to stack, false otherwise

isRemovable

boolean isRemovable()
Checks if card can be removed from stack

Returns:
true if card can be removed from stack, false otherwise

isFull

boolean isFull()
Checks if stack is empty or not

Returns:
true if stack is empty, false otherwise

isEmpty

boolean isEmpty()
Checks if stack is empty or not

Returns:
true if stack is empty, false otherwise

clear

void clear()
Clears the stack