public class TttBoard { public static char[][] theBoard; public TttBoard() { theBoard = new char[3][3]; } public void initializeBoard(char c) { for (int i = 0; i < 3; i ++) { for (int j = 0; j < 3; j ++) { theBoard[i][j] = c; } } } public void draw() { for (int i = 0; i < 3; i ++) { System.out.println(" | | "); System.out.println(" " + theBoard[i][0] + " | " + theBoard[i][1] + " | " + theBoard[i][2]); System.out.println(" | | "); if (i < 2) System.out.println("---+---+---"); } } public void move(int square, char c) { int temp = square - 1; theBoard[temp/3][temp %3] = c; } public boolean isSquareEmpty (int square) { int temp = square - 1; return theBoard[temp/3][temp %3] != ' '; } }