|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cb.jset.BoardImpl
An implementation of a set game board.
Constructor Summary | |
BoardImpl()
|
Method Summary | |
void |
addBoardListener(SetGameBoardListener boardListener)
Adds a boardListener to this board. |
void |
addCards(CardProperties[] cards)
Add the specified cards onto the board. |
CardProperties[] |
getCards()
|
int |
getNbCards()
|
void |
matchSet(CardSet set)
Tries to match the specified set on this board. |
void |
removeBoardListener(SetGameBoardListener boardListener)
Removes a listener from this board. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BoardImpl()
Method Detail |
public CardProperties[] getCards()
getCards
in interface org.cb.jset.SetGameBoard
public void addBoardListener(SetGameBoardListener boardListener)
null
is passed as argument.
addBoardListener
in interface org.cb.jset.SetGameBoard
boardListener
- the boardListener to addpublic void removeBoardListener(SetGameBoardListener boardListener)
null
is passed as argument.
removeBoardListener
in interface org.cb.jset.SetGameBoard
boardListener
- the listener to removepublic void addCards(CardProperties[] cards)
addCards
in interface org.cb.jset.SetGameBoard
cards
- a non-null
array, containing non-null
elements.public int getNbCards()
getNbCards
in interface org.cb.jset.SetGameBoard
public void matchSet(CardSet set) throws MatchingException, BoardException
matchSet
in interface org.cb.jset.SetGameBoard
set
- the set to remove
MatchingException
- if the specified set is not matching
BoardException
- if one of the set card is not on the board.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |