Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Programming Assignment: Guessing Game

Game Rules

For this assignment, you will be writing a game. The rules of the game are simple you have a game board with hidden tiles. You have to make three guesses if you pick all safe squares, you win, if you select a bad square, you lose. All game boards have are square, meaning both sides have the same length. The game board size will never be larger than 25 or below 1. The gameboard contains only 4 possible values (3 are requirements, the 4th is for bonus).

If the square contains a 'S' it is safe. Meaning you have successfully made one guess.

If the square contains a 'B' you lose. Meaning the game is over.

If the square contains a 'R' you must pick again, this guess doesn’t count towards your guesses.

If the square contains a 'C' it safely clears the area. (See bonus information in code).

A game board file has the format ( for a size of 3. )

3

SSS

SRS

SBS

The game ends after successfully guessing three safe squares or guessing a losing square. After each guess, your program should display the contents of the gameboard square and print the corresponding message.

Unlike previous examples, this assignment provides a starting point. Would you please check the template file provided to start. The assignment file contains multiple function prototypes that must be completed by you. These can not be changed and are required to be used during the completion of the assignment. You may add your own functions as needed. As this assignment will be reviewed in-depth by teaching assistants, all code must be correctly formatted or will be heavily penalized for bad formatting. You may not use global variables or gotos in your program. If you’re concerned about any requirements, please use the discussion boards for clarification.

Please note you should run the example solution to determine the output and formatting from other inputs and test your own examples. Several test boards are provided but you may want to create your own for testing.  The user input is highlighted in red and examples in blue highlight some of the error handling in the game.

Please note: This assignment will be partially graded using an auto-grader. Output errors not matching the sample input, test cases, and the solution program will result in deductions. The examples are not providing all test cases or errors, but the format of the text will remain consistent.

Coding Quality is still required and will be deducted as an overall error. Please see the codeStyle document under the assignment section for the preferred style.

a.12% - Function readBoard

-Function directly reads the game board and size from the file.

b.13% - Function  - printBoard.

-The function should print the regular game board.

-The function should print be able to switch to the ??? version.

c.50% - Function playGame:

-15% Printing the proper information and format

-10% Checking the gameboard square and performing the appropriate action

-25% Determining rounds and if the game has ended.

d.25% - Main and other functions

-The remaining tasks of managing a user-provided file.

-Starting the main tasks such as reading the board and playing the game.

-Indicating if the game was won or not.

-The function IsvalidSquare

-Other deductions may apply these are simply common issues.

-Code that does not compile ( will be marked as 0 )

-Please review C/C++ style guide and examples.

-Missing student information in comments.

-Incorrect or inconsistent code formatting.

-Printing unrequired information to the screen.

-Variables names are non-descriptive or not in camelCase.

-Program input and output not matching Samples.

support
close