Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Craps Purpose: The purpose of this assignment is for students to become familiar with the Visual Studio IDE compiling and executing a C# app. C#
Craps Purpose: The purpose of this assignment is for students to become familiar with the Visual Studio IDE compiling and executing a C# app. C# input and output commands and C# control structures. Since we have not yet studied the C# object-oriented concepts and syntax, you may code this app in the main class. All future assignments will be object-oriented. Assignment Description: Write a complete C# app to simulate a game of Craps. To play the game, a player rolls a pair of dice (2 die). After the dice come to rest, the sum of the faces of the 2 die is calculated. I the sum is 7 or 11 on the first throw, the player wins and the game is over. If the sum is 2, 3, or 12 on the first throw, the player loses and the game is over. If the sum is 4, 5, 6,8,9, or 10 on the first throw, then that sum is known as the player's point To win, he must keep throwing the dice until he/she "makes his point', that is, the sum of the dice is equal to his point. The player loses if he throws a 7 before making his point. In either case, the game is over The player will be assigned 100 chips before beginning to play the game. Each time the game is played, the user will be asked to make a wager. If the player wins the game, s(he) receives double his wager. If s(he) loses, then the wager is lost. The game is played until the player no longer wishes to play or until the chips are all used. At this time, display the total number of chips remaining Requirements: After the first rol of the pair of dice, display the outcome as to whether the player won, lost, or the value of the player's "point If the player continues to roll to make his/her point, display a message as to whether heshe won or lost after he/she has either made is "point or rolled a7 When a game is finished, the program should ask if the player wants to play another. It should either play another game or terminate, based on the user response. When the player does not wish to play anymore or all the chips are used, display the number of chips Be sure to use clear instructions to the user. You may design your output as you wish as long at it is Include comments to explain the purpose of the code Include comments defining the purpose of the code r name as a comment at the beginning of the program. aming conventions as well as indentation for if statements and loops. Screenshot
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started