vutbr.checkers.game
Class GamePieceKing

java.lang.Object
  extended by vutbr.checkers.game.GamePiece
      extended by vutbr.checkers.game.GamePieceKing

public class GamePieceKing
extends GamePiece

Trida GamePieceKing - figurka kralovny

Author:
Ondřej Choleva

Constructor Summary
GamePieceKing(GameBoard board, int x, int y, Game.GameColor color)
          Konstruktur
 
Method Summary
protected  boolean possibleTurn(int toX, int toY, GameTurnState gameTurnState)
          Overi, zda je tento tah kralovnou mozny
protected  boolean turn(int toX, int toY, GameTurnState gameTurnState)
          Provede tah kralovnou
 
Methods inherited from class vutbr.checkers.game.GamePiece
getBoard, getColor, getX, getY, possibleTurn, setColor, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GamePieceKing

public GamePieceKing(GameBoard board,
                     int x,
                     int y,
                     Game.GameColor color)
Konstruktur

Parameters:
board - Hraci plocha
x - Souradnice X
y - Souradnice Y
color - Barva figurky
Method Detail

turn

protected boolean turn(int toX,
                       int toY,
                       GameTurnState gameTurnState)
Provede tah kralovnou

Specified by:
turn in class GamePiece
Parameters:
toX - Cilova souradnice X
toY - Cilova souradnice Y
gameTurnState - Stav tahu hry
Returns:
True pokud se tah povedl

possibleTurn

protected boolean possibleTurn(int toX,
                               int toY,
                               GameTurnState gameTurnState)
Overi, zda je tento tah kralovnou mozny

Parameters:
toX - Cilova souradnice X
toY - Cilova souradnice Y
gameTurnState - Stav tahu hry
Returns:
True pokud je tah mozny