Question: Using c++. Create a class TicTacToe that will enable you to write a complete program to play the game of tic-tac-toe. The class contains as

Using c++. Create a class TicTacToe that will enable you to write a complete program to play the game of tic-tac-toe. The class contains as private data a 5-by-5 two-dimensional array of integers. The constructor should initialize the empty board to all zeros. Allow two human players. Wherever the first player moves, place a 1 in the specified square. Place a 2 wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won or is a draw. Also, allow the player to specify whether he or she wants to go first or second.

Grid Size: 5 x 5

A player needs 5 x 5 in a row to win

Thanks for the help

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!