|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cb.jset.JSetGameImpl.GameConnectionImpl
A GameConnectionImpl instance acts as a broker between a Player and the Game Useful to keep track which player does what.
Constructor Summary | |
JSetGameImpl.GameConnectionImpl(SetGamePlayer player)
Creates a new instance of GameConnectionImpl |
Method Summary | |
void |
close()
Close the game connection, effectively leaving the game. |
boolean |
isClosed()
Say wether the game connection is closed or not. |
void |
matchSet(CardSet set)
Used by a registered player to try to match a set of cards. |
void |
run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JSetGameImpl.GameConnectionImpl(SetGamePlayer player)
Method Detail |
public void matchSet(CardSet set) throws MatchingException
SetGameConnection
matchSet
in interface SetGameConnection
set
- the set to try to match.
MatchingException
- if the set doesn't match or if a card is not on the board.public void close()
SetGameConnection
close
in interface SetGameConnection
public boolean isClosed()
SetGameConnection
isClosed
in interface SetGameConnection
true
if the connection is closed, false
otherwise.public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |