JGAP

examples.gp.tictactoe
Class Board

java.lang.Object
  extended by examples.gp.tictactoe.Board

public class Board
extends java.lang.Object

A Tic Tac Toe board (3x3).

Since:
3.2

Field Summary
static int HEIGHT
           
static int WIDTH
           
 
Constructor Summary
Board()
           
 
Method Summary
 void beginTurn()
           
 void endRound()
           
 void endTurn()
           
 int getLastColor()
           
 int getReadPositionCount()
           
 boolean isEndOfGame()
           
 boolean putStone(int x, int y, int a_color)
           
 int readField(int a_index)
           
 int readField(int x, int y)
           
 void resetBoard()
           
 void startNewRound()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

public static int WIDTH

HEIGHT

public static int HEIGHT
Constructor Detail

Board

public Board()
Method Detail

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()

JGAP