[SOLVED] 代写 game CS020 – Programming Assignment 2

30 $

File Name: 代写_game_CS020_–_Programming_Assignment_2.zip
File Size: 433.32 KB

SKU: 0549066754 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


CS020 – Programming Assignment 2
Posted: Oct 22nd 2019 Due: Nov 18th
Include the author names in your files (mandatory). All the code you write should be your own. Copying the code in any form will result in 0 on this assignment or XF in the course, depending on the level of infraction This is a tough assignment! Start early. Team up with a partner
CS020 Tic-Tac-Toe (Modular Programming Exercise) – 50 Points
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

Here are the snapshots of a successful game play where computer wins

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
After finishing the game, greet the player and gracefully exit
For your benefit dispBoard.m function is given to you! (So you can focus on the game logic rather than worrying about board visualization)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 game CS020 – Programming Assignment 2
30 $