manager
Class TictactoeGame

java.lang.Object
  extended by manager.Game
      extended by manager.TictactoeGame

public class TictactoeGame
extends Game

This class extends the generic board game class Game to support a tic tac toe game.

Version:
0.5 beta - 03/15/2006
Author:
Luciano Antonio Digiampietri
See Also:
Game

Field Summary
 
Fields inherited from class manager.Game
BOARD, CONT_ID, DRAWN_GAME, GAME_ENDED, GAME_STARTED, GAME_TYPE, LAST_MESSAGE, MAX_PLAYERS, MIN_PLAYERS, PLAYERS, WAITING_PLAYERS, WINNER
 
Constructor Summary
TictactoeGame(java.lang.String name)
           
TictactoeGame(java.lang.String name, int player1)
           
 
Method Summary
 boolean add(int x, int y, int Player)
           
 boolean canAdd(int x, int y, Piece P)
           
 boolean gameEnded()
           
 void initializeBoard()
           
 boolean player1Won()
           
 boolean player2Won()
           
 void startGame()
           
 boolean won(int Player)
           
 
Methods inherited from class manager.Game
canAdd, canMove, currentBoard, endTurn, gameDraw, getActualPlayer, getColumns, getCurrentGameId, getGameName, getGameType, getLines, getMaxPlayers, getMessage, getMinPlayers, getPlayers, getStatus, joinGame, move, rotate, waitingPlayers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TictactoeGame

public TictactoeGame(java.lang.String name)

TictactoeGame

public TictactoeGame(java.lang.String name,
                     int player1)
Method Detail

startGame

public void startGame()

canAdd

public boolean canAdd(int x,
                      int y,
                      Piece P)

add

public boolean add(int x,
                   int y,
                   int Player)
Overrides:
add in class Game

initializeBoard

public void initializeBoard()
Overrides:
initializeBoard in class Game

gameEnded

public boolean gameEnded()
Overrides:
gameEnded in class Game

player1Won

public boolean player1Won()

player2Won

public boolean player2Won()

won

public boolean won(int Player)