Question: IT SHOULD BE IN C + + Tic - Tac - Toe, Portfolio One Background Information Tic - tac - toe is a game for

IT SHOULD BE IN C++
Tic-Tac-Toe, Portfolio One
Background Information
Tic-tac-toe is a game for two players who take turns marking the spaces in a three-by- three grid with an "X" or "O". The player who puts three of their marks in a horizontal, vertical, or diagonal row is the winner. You can see a full writeup of the rules and a bit of game theory behind tic-tac-toe on its Wikipedia page.
Problem Statement
Implement a human versus human game of tic-tac-toe that can be played on the
command line.
Acceptance Criteria
You should implement a human vs human game of tic-tac-toe. o Computerplayersarenotrequiredforthissubmission. o Player1isXandPlayer2isO.
o Thegameisplayedona3x3board.
o Thisgameoftic-tac-toeshouldimplementalltheclassicrulese.g. players take turns marking the board, three marks in a row wins, etc.
As a tic-tac-toe player, when I start the program, I should see:
o Awelcomemessageforthegame.
o Anicelyformattedboardconsistingofa3x3squaregridofcells.Thecells
should be numbered 19. o Aprompttotakeamove.
As a tic-tac-toe player, after I make a valid move, I should see:
o Theboardinitsupdatedstatewithallofthemovestakenthusfar o Apromptforthenextplayertomakeamove.
o Detailsfortheendofthegameifthegameisover(seebelow).
As a tic-tac-toe player, after I make an invalid move, I should see:
o Theboardinitscurrentstatewithnoadditionalmovesmade o Aprompttellingmethatmymovewasinvalidandtotryagain.
When the game ends:
o Itshouldtellmewhichplayerwonorifthegameendedinadraw.
o Itshouldpromptmetoplayagain.
If I choose to play the game again, it should start a brand new game with a cleared
board.
The program should warn a user when an input is invalid. This applies when a user
enters a cell position and when a user decides to play again. Some validations include:
o Acellisalreadytaken.
o Astringorcharinputinsteadofaninteger(orviceversa). o Randomorunexpectedsymbols.
o Randomwhitespace.
o Adecimalnumberinsteadofanintegerforthecellinput. o Noinput(justpressingenter).
Your program should not crash from user input!

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 Programming Questions!