vutbr.checkers.game
Class GamePieceMan

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

public class GamePieceMan
extends GamePiece

Trida GamePieceMan - figurka pesce

Author:
Ondrej Novy

Constructor Summary
GamePieceMan(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 pescem mozny
protected  boolean turn(int toX, int toY, GameTurnState gameTurnState)
          Provede tah pescem
 
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

GamePieceMan

public GamePieceMan(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 pescem

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 pescem mozny

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