Java : AI Dots & Boxes

In this assignment, I was tasked with creating an Artifical Intelligence using a MiniMax Algorithm in Java that will play the Dots and Boxes Board game using a simple input/output prompt in the Eclipse terminal. The board is created by a 2D array, with each index being either a plus sign (+) for a corner, an asterik for a line (*), or a number to showcase the points that completing a box in that area gets. For instance, take this board that is created using a 2D int array.

  *    + * + * +  #row0
         *    * 1 * 5 *  #row1
         *    + * + * +  #row2
         *    * 4 * 3 *  #row3
         *    + * + * +  #row4
         *    0 1 2 3 4

If I complete a box around the number 1, I would receive 1 point.

  *    + – + * +  #row0
         *    | 1 | 5 *  #row1
         *    + – + * +  #row2
         *    * 4 * 3 *  #row3
         *    + * + * +  #row4
         *    0 1 2 3 4

There are extensive comments in all of my java files for running and using this program. For simplicity, download the source files and import all java files into your code editor. After this, open Main.java to run the program. The program requires user interaction in the terminal area, but this is prompted and the instructions are clear to follow.

Source Files