de.torfu.kabayellow.common
Class ActionMoveKing

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

public class ActionMoveKing
extends Action

Versetzt den König am Anfang einer Phase. Ist nur erlaubt, wenn die aktuelle Runde gleich ROUND_MOVE_KNIGHT (0) ist. Nach dem Ausführen der ActionMoveKing-Aktion ist der Zug sofort beendet. Die Position muss durch Action.setPoint(Point) festgelegt werden. Achtung: Der Startpunkt der Bewegung wird nicht angegeben, sondern nur der Endpunkt!


Field Summary
 
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
 
Constructor Summary
ActionMoveKing()
           
 
Method Summary
 int getErrorCode(Game game)
          Überprüft, ob der Zug den Regeln entspricht.
 
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, isActionCard, isBuyCardAction, isKingAction, isKnightAction, isLegal, isnewKnightAction, isStoneAction, needsOnePoint, needsParameters, needsTwoPoints, setEndPoint, setID, setPoint, setPoint, setPoints, setStartPoint, toServer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionMoveKing

public ActionMoveKing()
Method Detail

getErrorCode

public int getErrorCode(Game game)
Überprüft, ob der Zug den Regeln entspricht.

Specified by:
getErrorCode in class Action