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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started