Program 8

Home Windows C++ 241 C++ 242 Contact Info Contents

Program 8 - February 26

Up

Tic Tac Toe Revisited : Arrays

Review the requirements for the tic-tac-toe game (Program #5) and the program you wrote to play the game. For this assignment, you will revise your original program as follows:

  1. Store your data in a single-dimensioned array.

  2. Continue to keep your data hidden by declaring it in a separate file. Try to have as few functions as possible which use that data directly.

  3. Try to write functions which use the array indices to determine if a move is a win or if the game is drawn.

Extra Credit

Revise your program so that a person can play against the computer. If you are going to do this assignment, turn in the main assignment first to get credit for it, then complete the extra credit portion before the end of the quarter. Some of what we will cover in the next few weeks will help you with this assignment.

Up

Home Windows C++ 241 C++ 242 Contact Info Contents

Copyright © 2000  Charlie Poole. All rights reserved.
Revised: July 15, 2002 - cpoole@ctc.edu