Im in a c++ class in college and need some help with this code. I did the assignment based off what i have learned in the class so far and obviously need to do more research in the book. Here is the assignment and what i have so far..
Program must use functions and CANNOT be written as one main program.
Use a function to display a set of instructions describing how the user must enter a "move" (this has to called only once at the beginning of the program)
Use a function to display the contents of the board. (Each element of the array should be initialized with an asterisk(*).
The program must clear the display screen after the user enters a new move, then display the contents of the board with the new move shown.
Use a function to describe the actions taken in each player's turn.
Validate each users move (i.e. if the user enters a location that already contains an X or an O or the numbers entered are not a valid position on the board an error will be displayed). The program must then ask the user to re-input their move.
Use a function to determine whether the player has won. The function should receive as arguments, the board and the player ( 'X' or 'O'). You also check for a Tie or End of Game in this function or create a separate function to do this.
The program should ask the player to enter the row and column number.
The board and the elements contained within the board must line up correctly.
The program MUST use a 2D Array to represent the playing board. Remember that C++ arrays are indexed starting with a subscript of 0 (zero). However the user is not expected to know that, so the rows and columns should be referred to in prompts as 1-3 rather than 0-2. See the illustrations below.
Determine whether a player has won or there is a tie. If there is a winner, the program should display that a player has won the game and which player has won. If there is a tie the program should display that a tie has occured an exit.