public interface TTTInterface { // eval: Return 1 if White has three in a row, three in a column, or // three on either diagonal. Return -1 if Black has three in a row, // three in a column, or three on either diagonal. Both of these // conditions can't apply in a real game; if they do, either 1 or -1 // is an acceptable value to return. If none of these conditions // apply, it should return 0. public int eval (); // // isDraw: Determine whether the game is a draw. // Return true if there are no unfilled spaces and neither player // has three in a row. Otherwise, return false. public boolean isDraw (); // stateScore: whiteMove is true if it's white's move, and false // if it's black's move. BestMove is an array of at least two integers. // There is no precondition on what values it must contain. // Postcondition: It should return 1 if white has won or can force // a win, -1 if black has won or can force a win, and 0 if neither // can force a win, which means that the game is destined to be a draw // (unless somebody makes a mistake). Bestmove has been filled // which the row and column of a move that leads to a new board state // that has this same state score. Such a move is a best move // a player can make. See handout for hints about how to proceed. public int stateScore (boolean whiteMove, int [] BestMove); }