Question: Tic-Tac-Toe is a simple and fun game for 2 players, X and O. It is played on a 3x3 grid. Each player's goal is
Tic-Tac-Toe is a simple and fun game for 2 players, X and O. It is played on a 3x3 grid. Each player's goal is to make 3 in a row, column or diagonally. Player 1 starts first on the first game and the computer starts the next game. The player continues to alternate from game to game. This helps keep gameplay fair over time. Player takes turns placing their Mark, X on an open square in the grid. The player should make 3 of their own mark in a row vertically, horizontally. or diagonally to win the game. If all 9 squares are filled and neither player has 3 in a row, the game is considered a Tie. Encapsulation X In this project, you will implement this two-player game on console, where player I will be you and player 2 will be the computer, so it will be computer against you. Apply all the OOP Abstraction Inheritance olx concepts that you have learned so far including: Objects and Classes polymorphism. Oxo X10X The program should first ask the name of the player. And then each player would be given a turn. All checks must be implemented, whether it's a draw, or either player who wins.
Step by Step Solution
3.43 Rating (143 Votes )
There are 3 Steps involved in it
InCase of ... View full answer
Get step-by-step solutions from verified subject matter experts
