Tic Tac Toe Assignment

Tic Tac Toe Assignment - Assignment:Program5:TicTacToe...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment: Program 5: Tic-Tac-Toe   Assignment Information Maximum grade: 100  Due date: April 4, 2008 Instructions: Write a C++ program that implements the 2-person game  tic-tac-toe . The program must do the  following:  Prompt each player for the player's name (allow full names).  Create a 2-dimensional array called TheBoard in main() that represents the current values of  the nine board positions.  Create a function called SetBoard(char TheBoard[][3]) that receives TheBoard as an input  parameter and initializes the board positions so that TheBoard[0][0] equals '1', Board[0][1]  equals '2', . .., Board[2][2] equals '9'. This function does not return anything.  Overload the function SetBoard with another function also called SetBoard(char TheBoard[] [3], int position, char mark) that checks to see if the  position  is already filled, and if it is not 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/01/2011.

Page1 / 2

Tic Tac Toe Assignment - Assignment:Program5:TicTacToe...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online