|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvutbr.checkers.game.GameBoard
public class GameBoard
Trida GameBoard - hraci plocha
Constructor Summary | |
---|---|
GameBoard(GameHistory gameHistory)
Konstruktor |
Method Summary | |
---|---|
protected void |
addPiece(int x,
int y,
GamePiece piece)
Prida figurku do hraciho pole |
protected GameHistory |
getGameHistory()
Vrati historii hry |
GamePiece |
getPiece(int x,
int y)
Vrati figurku na souradnicich |
boolean |
isGameEnd()
Je konec hry? |
protected void |
movePiece(int x,
int y,
int toX,
int toY)
Presune figurku z pole jine pole |
protected void |
removePiece(int x,
int y)
Odstrani figurku z pole |
protected void |
switchPiece(int x,
int y,
GamePiece newPiece)
Vymeni figurku v poli za jinou |
protected boolean |
turn(int x,
int y,
int toX,
int toY,
GameTurnState gameTurnState)
Provede tah figurkou |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameBoard(GameHistory gameHistory)
Method Detail |
---|
protected GameHistory getGameHistory()
protected void addPiece(int x, int y, GamePiece piece)
x
- Souradnice Xy
- Souradnice Ypiece
- Figurkapublic GamePiece getPiece(int x, int y)
x
- Souradnice Xy
- Souradnice Y
protected void movePiece(int x, int y, int toX, int toY)
x
- Zdrojova souradnice Xy
- Zdrojova souradnice YtoX
- Cilova souradnice XtoY
- Cilova souradnice Yprotected void removePiece(int x, int y)
x
- Souradnice Xy
- Souradnice Yprotected void switchPiece(int x, int y, GamePiece newPiece)
x
- Souradnice Xy
- Souradnice YnewPiece
- Nova figurkaprotected boolean turn(int x, int y, int toX, int toY, GameTurnState gameTurnState)
x
- Zdrojova souradnice Xy
- Zdrojova souradnice YtoX
- Cilova souradnice XtoY
- Cilova souradnice YgameTurnState
- Stav tahu hry
public boolean isGameEnd()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |