manager
Class Game
java.lang.Object
manager.Game
- Direct Known Subclasses:
- CheckersGame, ChessGame, DeflexionGame, Tictactoe3DGame, TictactoeGame
public abstract class Game
- extends java.lang.Object
This class is a generic class of Board Games.
The public interface is responsible for all allowed actions in any kind of board game and should be
implemented in the specialized class.
Each game contains its Board
and each Board contains its pieces (@link piece}
- Version:
- 0.5 beta - 03/15/2006
- Author:
- Luciano Antonio Digiampietri
- See Also:
Board
,
Piece
Constructor Summary |
Game()
|
Game(java.lang.String name)
|
Game(java.lang.String name,
int Player)
|
Method Summary |
boolean |
add(int x,
int y,
int Player)
|
boolean |
canAdd(int x,
int y,
int Player)
|
boolean |
canMove(int x1,
int y1,
int x2,
int y2,
int Player)
|
java.lang.String |
currentBoard()
|
boolean |
endTurn(int Player)
|
boolean |
gameDraw()
|
boolean |
gameEnded()
|
int |
getActualPlayer()
|
int |
getColumns()
|
int |
getCurrentGameId()
|
java.lang.String |
getGameName()
|
java.lang.String |
getGameType()
|
int |
getLines()
|
int |
getMaxPlayers()
|
java.lang.String |
getMessage()
|
int |
getMinPlayers()
|
java.util.List |
getPlayers()
|
GameStatus |
getStatus()
|
void |
initializeBoard()
|
boolean |
joinGame(int playerID)
|
boolean |
move(int x1,
int y1,
int x2,
int y2,
int Player)
|
boolean |
rotate(int x,
int y,
java.lang.String direction,
int Player)
|
boolean |
waitingPlayers()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BOARD
public Board BOARD
WINNER
public int WINNER
GAME_ENDED
public boolean GAME_ENDED
DRAWN_GAME
public boolean DRAWN_GAME
PLAYERS
public java.util.List PLAYERS
CONT_ID
public int CONT_ID
GAME_TYPE
public java.lang.String GAME_TYPE
MAX_PLAYERS
public int MAX_PLAYERS
WAITING_PLAYERS
public boolean WAITING_PLAYERS
MIN_PLAYERS
public int MIN_PLAYERS
GAME_STARTED
public boolean GAME_STARTED
LAST_MESSAGE
public java.lang.String LAST_MESSAGE
Game
public Game(java.lang.String name)
Game
public Game()
Game
public Game(java.lang.String name,
int Player)
getActualPlayer
public int getActualPlayer()
initializeBoard
public void initializeBoard()
canAdd
public boolean canAdd(int x,
int y,
int Player)
getCurrentGameId
public int getCurrentGameId()
getStatus
public GameStatus getStatus()
currentBoard
public java.lang.String currentBoard()
move
public boolean move(int x1,
int y1,
int x2,
int y2,
int Player)
endTurn
public boolean endTurn(int Player)
canMove
public boolean canMove(int x1,
int y1,
int x2,
int y2,
int Player)
add
public boolean add(int x,
int y,
int Player)
getGameName
public java.lang.String getGameName()
getLines
public int getLines()
getColumns
public int getColumns()
gameEnded
public boolean gameEnded()
getMaxPlayers
public int getMaxPlayers()
getMinPlayers
public int getMinPlayers()
getGameType
public java.lang.String getGameType()
rotate
public boolean rotate(int x,
int y,
java.lang.String direction,
int Player)
getPlayers
public java.util.List getPlayers()
joinGame
public boolean joinGame(int playerID)
waitingPlayers
public boolean waitingPlayers()
getMessage
public java.lang.String getMessage()
gameDraw
public boolean gameDraw()