Order ready-to-submit essays. No Plagiarism Guarantee!
Note: Our papers are 100% human-written, not AI-generated.
We Write Essays for Students
Tell us about your assignment and we will find the best writer for your paper
Get Help Now!
CSC 225 Sneaky Snacky Squirrel Game Programming Assignment
Instructions
|
Your task in this program will be to develop an electronic version of the Sneaky Snacky Squirrel Game. The rules for the game can be found here, and a video of gameplay can be found here.
You will need to define a Log class for this program, as described in the slides from February 21.
When the program begins, it should ask the user for the number of players (2 to 4). Then, for each turn, the program should print the current state of the game, as well as indicate whose turn it is. A keypress will have the user spin the wheel, and the program will indicate the result, and, if necessary, ask for more information. After the turn is complete, the program will then either move on to the next player, or indicate that a player has won the game.
You must also create the following functions as specified and use them in your main program. You may create other functions as you see fit. CSC 225 Sneaky Snacky Squirrel Game Programming Assignment
| Function Prototype | Description |
| long spin() | Simulates a spin of the wheel by returning a number from 0 to 9. |
| void printState(Log[], long) | Clears the screen and then prints the current state of the game when passed the array of Log objects and the number of players. |
| char chooseColor() | Asks the user to pick a character representing one of the five colors. It should validate the letter selected, allowing either upper or lower case letters to be entered. It should always return the upper case version. |
| void playTurn(Log[], long, long) | Simulates one turn. It is passed the array of Log objects, current player, and total number of players. |
In addition to the program functioning correctly as described above, you will also be graded on:
- Using appropriate variable names, data types, and constants
- Limit globals
- Declare variables at the beginning of your functions
- Name constants using all capital letters
- Using comments appropriately, including header comments
- Formatting your code appropriately using tabs and blank lines
- Having user-friendly and well-formatted input and output
- Appropriate data validation
Additional information:
- Make sure you understand the above requirements before you begin. Dr. Thompson can provide any clarifications you need
- When printing the current state of the game, it should look as follows (depending on the spin result):
- To clear the screen, use the call system(“cls”)
- If a player has the opportunity to choose two colors, but only needs one to win, the game should end immediately after they choose the correct color
- When a player has the opportunity to steal an acorn, the program should make sure they do not choose themselves, but they can choose a player who has no acorns.
- Any color they choose should be allowed
- If the player they choose does not have that color, they do not get that color, and lose their turn
- If they already have that color, the other player should still lose that color
- Any color they choose should be allowed
In order to receive any credit for this assignment, all of the following must be completed:
- Your Log class should compile and pass all the tests in TestLog.cpp (on eLearn)
- You main program should compile with no errors and:
The spin, printState, and chooseColor functions should be implemented correctly
CSC 225 Sneaky Snacky Squirrel Game Programming Assignment
Need Help with a similar Assignment?
The post CSC 225 Sneaky Snacky Squirrel Game Programming Assignment appeared first on EssayPanthers.
Welcome to originalessaywriters.com, our friendly and experienced essay writers are available 24/7 to complete all your assignments. We offer high-quality academic essays written from scratch to guarantee top grades to all students. All our papers are 100% plagiarism-free and come with a plagiarism report, upon request
Tell Us “Write My Essay for Me” and Relax! You will get an original essay well before your submission deadline.

