jaige.games.hex
Class HexBoard

java.lang.Object
  extended by jaige.GameBoard
      extended by jaige.games.hex.HexBoard
All Implemented Interfaces:
GameListener, MoveListener

public class HexBoard
extends GameBoard


Field Summary
 
Fields inherited from class jaige.GameBoard
players, turn, winner
 
Constructor Summary
HexBoard()
           
 
Method Summary
 Player checkForWinner()
           
 Cell getCell(int x, int y)
           
 Cell getCell(java.awt.Point p)
           
 Cell[][] getCells()
           
 void getNeighbors(java.util.List<jaige.games.hex.CellList> list, int x, int y)
           
 Orientation[] getOrientations()
           
 Player getTurn()
           
 java.util.ArrayList<java.awt.Point> getWinningPath()
           
 void makeMove(int x, int y)
           
 void printBoard(java.io.PrintStream out)
           
 void processMoveEvent(MoveEvent event)
           
 void reset()
           
 void setBoardSize(int... size)
           
 void setPlayers(Player... players)
           
 
Methods inherited from class jaige.GameBoard
abort, destroy, gameOver, getPlayers, getWinner, isGameOver, start, startAndWaitForWinner, switchTurns
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexBoard

public HexBoard()
Method Detail

setBoardSize

public void setBoardSize(int... size)
Specified by:
setBoardSize in class GameBoard

processMoveEvent

public void processMoveEvent(MoveEvent event)

setPlayers

public void setPlayers(Player... players)
Overrides:
setPlayers in class GameBoard

getCells

public Cell[][] getCells()

getCell

public Cell getCell(int x,
                    int y)

getCell

public Cell getCell(java.awt.Point p)

getNeighbors

public void getNeighbors(java.util.List<jaige.games.hex.CellList> list,
                         int x,
                         int y)

reset

public void reset()
Specified by:
reset in class GameBoard

makeMove

public void makeMove(int x,
                     int y)

checkForWinner

public Player checkForWinner()

getWinningPath

public java.util.ArrayList<java.awt.Point> getWinningPath()

printBoard

public void printBoard(java.io.PrintStream out)

getTurn

public Player getTurn()
Overrides:
getTurn in class GameBoard

getOrientations

public Orientation[] getOrientations()
Specified by:
getOrientations in class GameBoard