public class Foundation extends CardStack
| Constructor and Description |
|---|
Foundation() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlayFrom()
Return whether or not a card may be removed from this stack.
|
boolean |
playTo(Card card)
Given a card to be played to the top of this card stack, either make the legal play and return true, or ignore the illegal play and return false.
|
addCard, getTopCard, isEmpty, playTo, removeTopCard, size, toArray, toStringpublic boolean canPlayFrom()
CardStackcanPlayFrom in class CardStackpublic boolean playTo(Card card)