@@ -0,0 +1,814 @@
+import java.util.Scanner;%0A%0A/**%0A * @author Richard Chen%0A *%0A */%0Apublic class Game %7B%0A%09/**%0A%09 * %0A%09 */%0A%09private void run() %7B%0A%09%09Board board = new Board();%0A%09%09System.out.println(board);%0A%0A%09%09Scanner scan = new Scanner(System.in);%0A%09%09while (scan.hasNextInt()) %7B%0A%09%09%09int x = scan.nextInt();%0A%09%09%09int y = scan.nextInt();%0A%09%09%09if (!board.isValidMove(x, y)) %7B%0A%09%09%09%09System.out.println(%22Invalid move.%22);%0A%09%09%09%09continue;%0A%09%09%09%7D%0A%0A%09%09%09Human.move(board, x, y);%0A%09%09%09if (board.getWinner() == Human.HUMAN_PLAYER) %7B%0A%09%09%09%09System.out.println(board + %22%5CnYou win!%22);%0A%09%09%09%09break;%0A%09%09%09%7D%0A%0A%09%09%09AI.move(board);%0A%09%09%09if (board.getWinner() == AI.AI_PLAYER) %7B%0A%09%09%09%09System.out.println(board + %22%5CnYou lose!%22);%0A%09%09%09%09break;%0A%09%09%09%7D%0A%0A%09%09%09System.out.println(board);%0A%09%09%7D%0A%09%09scan.close();%0A%09%7D%0A%0A%09/**%0A%09 * @param args%0A%09 */%0A%09public static void main(String%5B%5D args) %7B%0A%09%09new Game().run();%0A%09%7D%0A%7D%0A

Create Game.java