aima.games
Class TicTacToeBoard
java.lang.Object
aima.games.TicTacToeBoard
public class TicTacToeBoard
- extends java.lang.Object
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TicTacToeBoard
public TicTacToeBoard()
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)