de.kosi.model.game
Class InvalidCardException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--de.kosi.model.game.InvalidCardException
All Implemented Interfaces:
java.io.Serializable

public class InvalidCardException
extends java.lang.Exception

This exception is thrown if a client tries to play a card that he doesn't have or that he isn't allowed to play regarding to the rules of Bridge.

ChangeLog:

 $Log: InvalidCardException.java,v $
 Revision 1.1.1.1  2001/04/29 18:05:18  jiriki
 Imported sources from zola.

 Revision 1.2  2001/03/06 18:07:19  login
 documented


 

Version:
$Revision: 1.1.1.1 $ ($Date: 2001/04/29 18:05:18 $)
Author:
Timo, Niklas, Ole
See Also:
Serialized Form

Field Summary
static java.lang.String[] ERROR_MSG
          This String array constant provides human readable error messages.
static int YOU_DON_T_HAVE_THAT_CARD
          This constant indicates that the client tried to play a card that he doesn't have.
static int YOU_HAVE_TO_FOLLOW_SUIT
          This constant indicates that the client tried to play a card that he wasn't allowed to because he didn't follow suit.
 
Constructor Summary
InvalidCardException(int type)
          Creates a new InvalidCardException instance that has the given type.
 
Method Summary
 int getType()
          Returns the type of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

YOU_DON_T_HAVE_THAT_CARD

public static final int YOU_DON_T_HAVE_THAT_CARD
This constant indicates that the client tried to play a card that he doesn't have.

YOU_HAVE_TO_FOLLOW_SUIT

public static final int YOU_HAVE_TO_FOLLOW_SUIT
This constant indicates that the client tried to play a card that he wasn't allowed to because he didn't follow suit.

ERROR_MSG

public static final java.lang.String[] ERROR_MSG
This String array constant provides human readable error messages.
Constructor Detail

InvalidCardException

public InvalidCardException(int type)
Creates a new InvalidCardException instance that has the given type.
Parameters:
type - The type of the exception. Must be one of the indicator constants.
Method Detail

getType

public int getType()
Returns the type of the exception.
Returns:
The type of the exception.