subject

You are required to submit a script file tictactoe. m and supporting functions (modular

design carries 10 points) to get credit for this assignment

when we run tictactoe. m script file, it should start with a welcoming message and show the dashboard of player/computer wins, draws and asks the player to flip a coin

if you enter an invalid input (anything other than h or t), it should prompt the player again!

once a valid character is entered, the game should start. you need to write code to simulate coin toss and decide whether the player or computer gets to start the game

if computer wins the toss, it plays first. you need to write code to let the computer randomly pick a vacant box on the board. computer uses β€˜o’ symbol on the board

if you win the toss, you get to play first. you need to write code to get input for row and column number. player uses β€˜x’ symbol on the board

so far, so good! here is where it gets tricky. you should not accept any invalid value for row and column numbers (the board is a 3 x 3 matrix). also, if a box is taken, you have to prompt the player again to enter a vacant box row and column

snapshots on next page!

input validation is a key task and you should take care of all these corner cases.

here are the snapshots of a successful game play where player won

here are the snapshots of a successful game play where the game is draw

if you observe, the dashboard at the beginning of the game keeps track of player wins, computer wins and number of draws in current session

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
When a rectangular region is defined using an appropriate style, which value matches the specified edge of the clipping region to the edge of the parent element?
Answers: 3
question
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
You know the right answer?
You are required to submit a script file tictactoe. m and supporting functions (modular

...
Questions
question
SAT, 10.12.2020 01:00
question
History, 10.12.2020 01:00
question
Mathematics, 10.12.2020 01:00
Questions on the website: 13722363