org.cb.jset
Class JSetGameImpl.GameConnectionImpl

java.lang.Object
  extended byorg.cb.jset.JSetGameImpl.GameConnectionImpl
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable, SetGameConnection
Enclosing class:
JSetGameImpl

public class JSetGameImpl.GameConnectionImpl
extends java.lang.Object
implements SetGameConnection, java.io.Serializable, java.lang.Runnable

A GameConnectionImpl instance acts as a broker between a Player and the Game Useful to keep track which player does what.

See Also:
Serialized Form

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

JSetGameImpl.GameConnectionImpl

public JSetGameImpl.GameConnectionImpl(SetGamePlayer player)
Creates a new instance of GameConnectionImpl

Method Detail

matchSet

public void matchSet(CardSet set)
              throws MatchingException
Description copied from interface: SetGameConnection
Used by a registered player to try to match a set of cards.

Specified by:
matchSet in interface SetGameConnection
Parameters:
set - the set to try to match.
Throws:
MatchingException - if the set doesn't match or if a card is not on the board.

close

public void close()
Description copied from interface: SetGameConnection
Close the game connection, effectively leaving the game.

Specified by:
close in interface SetGameConnection

isClosed

public boolean isClosed()
Description copied from interface: SetGameConnection
Say wether the game connection is closed or not.

Specified by:
isClosed in interface SetGameConnection
Returns:
true if the connection is closed, false otherwise.

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2004 CoffeeBreaks. All Rights Reserved.