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.client
Class ClientGame

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

    public class ClientGame

extends Game

Trida ClientGame - klientska cast hry

Author:
  Ondrej Novy

Nested Class Summary

Nested classes/interfaces inherited from class vutbr.checkers.game.Game
`Game.GameColor`

Constructor Summary
`ClientGame(ClientThread clientThread, Game.GameColor myColor, MainWindow mainWindow)` Konstruktor

Method Summary
`ClientThread` | `getClientThread()` Vrati vlakno komunikace klientske strany
`Game.GameColor` | `getMyColor()` Vrati barvu hrace
`boolean` | `myTurn(int x, int y, int toX, int toY)` Overi zda mohu tahnout a pripadne zavola turn()
`boolean` | `turn(int x, int y, int toX, int toY)` Provede tah figurkou
`boolean` | `turnEnd()` Ukonci tah

Methods inherited from class vutbr.checkers.game.Game
`getBoard, getGameHistory, getOnTurn, isGameEnd, setOnTurn`

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

Constructor Detail

### ClientGame

    public ClientGame(ClientThread clientThread,
                      Game.GameColor myColor,
                      MainWindow mainWindow)

  Konstruktor

  Parameters:
    `clientThread` - Trida clientThread
    `myColor` - Barva hrace

Method Detail

### turn

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

  Provede tah figurkou

  Overrides:
    `turn` in class `Game`
  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

  Overrides:
    `turnEnd` in class `Game`
  Returns:
    True pokud se konec tahu povedl

### myTurn

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

  Overi zda mohu tahnout a pripadne zavola turn()

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

### getMyColor

    public Game.GameColor getMyColor()

  Vrati barvu hrace

  Returns:
    Barva hrace

### getClientThread

    public ClientThread getClientThread()

  Vrati vlakno komunikace klientske strany

  Returns:
    Vlakno komunikace klientske strany

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