examples.gp.tictactoe
Class Board
java.lang.Object
examples.gp.tictactoe.Board
public class Board
- extends java.lang.Object
A Tic Tac Toe board (3x3).
- Since:
- 3.2
Constructor Summary |
Board()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WIDTH
public static int WIDTH
HEIGHT
public static int HEIGHT
Board
public Board()
resetBoard
public void resetBoard()
startNewRound
public void startNewRound()
beginTurn
public void beginTurn()
endTurn
public void endTurn()
endRound
public void endRound()
putStone
public boolean putStone(int x,
int y,
int a_color)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
readField
public int readField(int x,
int y)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getReadPositionCount
public int getReadPositionCount()
readField
public int readField(int a_index)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
isEndOfGame
public boolean isEndOfGame()
getLastColor
public int getLastColor()