de.torfu.kabayellow.common
Class ActionCardUnknown

java.lang.Object
  |
  +--de.torfu.kabayellow.common.Action
        |
        +--de.torfu.kabayellow.common.ActionCard
              |
              +--de.torfu.kabayellow.common.ActionCardUnknown
All Implemented Interfaces:
java.lang.Cloneable

public class ActionCardUnknown
extends ActionCard

Wird als Platzhalter für unbekannte Aktionskarten (z.B. beim Gegner) verwendet.


Field Summary
 
Fields inherited from class de.torfu.kabayellow.common.ActionCard
ANY_GATE, EXTRA_STONE, JUMP, MOVE_DIAGONAL, MOVE_STONE, REACTIVATE_KNIGHT, SEVEN_POINTS, SIX_POINTS, STONE_UNDER_KNIGHT, TWO_LEVELS, UNKNOWN
 
Fields inherited from class de.torfu.kabayellow.common.Action
ERROR_ACTIONCARD_IS_NEW, ERROR_CARD_NOT_NEEDED, ERROR_CASTLE_PROPERTY_VIOLATED, ERROR_CASTLE_SPLIT, ERROR_CODE_NONE, ERROR_DOESNT_HAVE_ACTIONCARD, ERROR_ILLEGAL_MOVE, ERROR_ILLEGAL_MOVE_THROUGH_CASTLE, ERROR_IMPOSSIBLE_MOVE, ERROR_KNIGHT_ON_TARGET_CELL, ERROR_MOVE_TOO_LONG, ERROR_NEW_CASTLE, ERROR_NO_ACTIONPOINTS_LEFT, ERROR_NO_ADJACENT_KNIGHT, ERROR_NO_CASTLE, ERROR_NO_KNIGHT_FOUND, ERROR_NO_MORE_CARDS_LEFT, ERROR_NO_MORE_KNIGHTS_LEFT, ERROR_NO_STONES_LEFT, ERROR_NO_STRAIGHT_MOVE, ERROR_NOT_ENOUGH_CASTLES, ERROR_ONLY_TWO_CARDS_ALLOWED, ERROR_PLAY_ONLY_ONE_CARD, ERROR_TOO_FEW_CASTLE, ERROR_TOO_HIGH, ERROR_WRONG_ROUND
 
Method Summary
 int canPlayCard(Game game)
           
 int getColor()
           
 int getErrorCode(Game game)
          Wie Action.isLegal(Game), nur wird statt einem Boolean eine ERROR_CODE_XXXX-Konstante zurückgegeben.
 int getNumber()
           
 java.lang.String getText()
          Gibt den Text, der auf der Karte steht aus
 int getType()
          Gibt den Typ der Karte als ActionCard.XXX-Konstante zurück
 java.lang.String toServer()
           
 java.lang.String toString()
           
 
Methods inherited from class de.torfu.kabayellow.common.ActionCard
create, createUnknown, isActionCard
 
Methods inherited from class de.torfu.kabayellow.common.Action
clone, execute, getActionMoveKnightsForLongMove, getCost, getCostsOfPossibleMoves, getEndPoint4Move, getError, getID, getPointFromIndex, getPossibleEndPoints, getPossibleLocations, getPossibleLongMoves, getPossibleMoves, getPossibleSetKnight, getPossibleStartPoints, getStartPoint, getStartPoint4Move, hasStartPoint, isBuyCardAction, isKingAction, isKnightAction, isLegal, isnewKnightAction, isStoneAction, needsOnePoint, needsParameters, needsTwoPoints, setEndPoint, setID, setPoint, setPoint, setPoints, setStartPoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getErrorCode

public int getErrorCode(Game game)
Description copied from class: Action
Wie Action.isLegal(Game), nur wird statt einem Boolean eine ERROR_CODE_XXXX-Konstante zurückgegeben. Diese Methode muss in den Unterklassen von der Regelgruppe überschrieben werden.

Specified by:
getErrorCode in class Action

canPlayCard

public int canPlayCard(Game game)
Overrides:
canPlayCard in class ActionCard

getText

public java.lang.String getText()
Description copied from class: ActionCard
Gibt den Text, der auf der Karte steht aus

Specified by:
getText in class ActionCard

getType

public int getType()
Description copied from class: ActionCard
Gibt den Typ der Karte als ActionCard.XXX-Konstante zurück

Overrides:
getType in class ActionCard

getColor

public int getColor()
Overrides:
getColor in class ActionCard

getNumber

public int getNumber()
Overrides:
getNumber in class ActionCard

toString

public java.lang.String toString()
Overrides:
toString in class ActionCard

toServer

public java.lang.String toServer()
Overrides:
toServer in class ActionCard