For our next lab, we will implement a program that can play an unbeatable game of Tic-Tac-Toe. This project will consist of three individual milestones that you will pass off one-by-one (display, algorithm, control). That way you can get partial credit if you don't complete the entire lab. A word of warning: some of you may find this lab very challenging. You will implement the algorithm for the computer player using a recursive minimax search. The algorithm is not that complex but recursive algorithms can be a challenge to debug so start early to give yourself extra time. If you are a little squeamish about recursion, make sure to start early.
This lab will consist of three milestones:
You will implement and test the Display and Algorithm milestones separately. The Control milestone will bring everything together to implement the entire game.
The program is divided into three main parts or packages:
Your program will be implemented in three separate milestones that correspond to the three different packages that you will implement: ticTacToeDisplay, minimax, ticTacToeControl. Each milestone will be passed off separately and the requirements are stated at the end of the description for each of the milestones below.
You can easily include files from previous labs so there is no need to move them or to recopy them. Assuming that each lab was placed in its own enclosing folder, the following example demonstrates how to do this. Let's say that I am working on Lab5 and I wanted to include some files from Lab 2. Your include statement would look something like:
The “..” tells the compiler to go up to the next directory.
Follow this procedure to submit your source code to learning-suite.