Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## vutbr.checkers.game
Class Game

    java.lang.Object
      vutbr.checkers.game.Game

Direct Known Subclasses:
  ClientGame, ReplayGame, ServerGame

    public abstract class Game

extends java.lang.Object

Trida Game - samotna hra

Author:
  Ondrej Novy

Nested Class Summary
`static class` | `Game.GameColor`

Constructor Summary
`Game()` Konstruktor

Method Summary
`GameBoard` | `getBoard()` Vrati aktualni hraci plochu
`GameHistory` | `getGameHistory()` Vrati historii hry
`Game.GameColor` | `getOnTurn()` Vrati barvu na tahu
`boolean` | `isGameEnd()` Je konec hry?
`protected void` | `setOnTurn(Game.GameColor onTurn)` Nastavi barvu na tahu
`boolean` | `turn(int x, int y, int toX, int toY)` Provede tah figurkou Tato funkce overuje, zda je tahnuto figurkou, jejiz barva je na tahu.
`boolean` | `turnEnd()` Ukonci tah

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Game

    public Game()

  Konstruktor

Method Detail

### getBoard

    public GameBoard getBoard()

  Vrati aktualni hraci plochu

  Returns:
    Aktualni hraci plocha

### setOnTurn

    protected void setOnTurn(Game.GameColor onTurn)

  Nastavi barvu na tahu

  Parameters:
    `onTurn` - Barva na tahu

### getOnTurn

    public Game.GameColor getOnTurn()

  Vrati barvu na tahu

  Returns:
    Aktualni barva na tahu

### getGameHistory

    public GameHistory getGameHistory()

  Vrati historii hry

  Returns:
    Historie hry

### turn

    public boolean turn(int x,
                        int y,
                        int toX,
                        int toY)

  Provede tah figurkou Tato funkce overuje, zda je tahnuto figurkou, jejiz barva je na tahu. Samotna implementace tahu je v tride GameBoard a GamePiece.

  Parameters:
    `x` - Zdrojova souradnice X
    `y` - Zdrojova souradnice Y
    `toX` - Cilova souradnice X
    `toY` - Cilova souradnice Y
  Returns:
    True pokud se tah povedl

### turnEnd

    public boolean turnEnd()

  Ukonci tah

  Returns:
    True pokud se konec tahu povedl

### isGameEnd

    public boolean isGameEnd()

  Je konec hry?

  Returns:
    Konec hry

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD