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
TicTacToe, Portfolio One
Background Information
Tictactoe is a game for two players who take turns marking the spaces in a threeby 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 tictactoe on its Wikipedia page.
Problem Statement
Implement a human versus human game of tictactoe that can be played on the
command line.
Acceptance Criteria
You should implement a human vs human game of tictactoe. o Computerplayersarenotrequiredforthissubmission. o PlayerisXandPlayerisO
o Thegameisplayedonaxboard.
o Thisgameoftictactoeshouldimplementalltheclassicruleseg players take turns marking the board, three marks in a row wins, etc.
As a tictactoe player, when I start the program, I should see:
o Awelcomemessageforthegame.
o Anicelyformattedboardconsistingofaxsquaregridofcells.Thecells
should be numbered o Aprompttotakeamove.
As a tictactoe player, after I make a valid move, I should see:
o Theboardinitsupdatedstatewithallofthemovestakenthusfar o Apromptforthenextplayertomakeamove.
o Detailsfortheendofthegameifthegameisoverseebelow
As a tictactoe 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 Astringorcharinputinsteadofanintegerorviceversa o Randomorunexpectedsymbols.
o Randomwhitespace.
o Adecimalnumberinsteadofanintegerforthecellinput. o Noinputjustpressingenter
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
