aima.games
Class TicTacToeBoard

java.lang.Object
  extended by aima.games.TicTacToeBoard

public class TicTacToeBoard
extends java.lang.Object


Constructor Summary
TicTacToeBoard()
           
 
Method Summary
 java.lang.Object clone()
           
 TicTacToeBoard cloneBoard()
           
 boolean equals(java.lang.Object anObj)
           
 int getNumberOfMarkedPositions()
           
 java.util.List getUnMarkedPositions()
           
 java.lang.String getValue(int row, int col)
           
 boolean isAnyColumnComplete()
           
 boolean isAnyDiagonalComplete()
           
 boolean isAnyRowComplete()
           
 boolean isEmpty(int row, int col)
           
 boolean isMarked(java.lang.String string, int i, int j)
           
 boolean lineThroughBoard()
           
 void mark(int row, int col, java.lang.String symbol)
           
 void markO(int row, int col)
           
 void markX(int row, int col)
           
 void print()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TicTacToeBoard

public TicTacToeBoard()
Method Detail

isEmpty

public boolean isEmpty(int row,
                       int col)

markX

public void markX(int row,
                  int col)

markO

public void markO(int row,
                  int col)

mark

public void mark(int row,
                 int col,
                 java.lang.String symbol)

isAnyRowComplete

public boolean isAnyRowComplete()

isAnyColumnComplete

public boolean isAnyColumnComplete()

isAnyDiagonalComplete

public boolean isAnyDiagonalComplete()

lineThroughBoard

public boolean lineThroughBoard()

getValue

public java.lang.String getValue(int row,
                                 int col)

print

public void print()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

cloneBoard

public TicTacToeBoard cloneBoard()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getNumberOfMarkedPositions

public int getNumberOfMarkedPositions()

getUnMarkedPositions

public java.util.List getUnMarkedPositions()

equals

public boolean equals(java.lang.Object anObj)
Overrides:
equals in class java.lang.Object

isMarked

public boolean isMarked(java.lang.String string,
                        int i,
                        int j)