Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. 6-3 Final Project Building Block Four: Programming (Reading From a File) Instructions Develop the code to solve the problem statement below. Follow these style

image text in transcribedimage text in transcribed

. 6-3 Final Project Building Block Four: Programming (Reading From a File) Instructions Develop the code to solve the problem statement below. Follow these style guidelines as you develop the code. Use commenting to describe your code, and practice debugging if you run into errors. Submit your final source code. Problem Statement: Open the rule document for the game you selected for your final project: LCR Rules Farkle Rules Liar's Dice Rules Use the document to write rules for the user on how to play the game in a text file. Then, using the information from the resource articles, create a program that will read in the text file and display it out to the user. To complete this assignment, review the Programming Guidelines and Rubric document. Submissions No submissions yet Oras and drop to upload your assignment below Drobnler hen or alck Dulow Re Choistine v 11 12 ker CV11H A NI CLIT. DUSUNdegrecut 12/1812_2_ww.cl 12 bars desene Southern New Hampshire University IT 312 Liar's Dice Rules DATA Develop a program that follows the rules of Liar's Dice as described. On program start-up, it shall display the rules to the user as read from a text file submitted with the program. The user can then set up the game by entering the number of players. Any number below two shall ask the user to add more players. Once gameplay has started based on the game rules, there are a few main pieces to address Rolling the die should be performed by randomly generating the side of the die displayed for all of the dice (five per player) using a random nurnber generator. This rolling only happens once at the beginning of the game. On each player's turn, the player should be able to view his/her dice only and enter their guess into the system. Continue playing until a player decides to call liar. Then show the full set of dice and determine if the last entered guess was correct. Display a message to the game winner (the player who made the guess if it was correct, the player that called liar if the guess was not correct). Liar's Dice is a multiplayer dice game with a minimum of two players and no upper limit on the number of participants. The goal is to make a correct guess or correctly call another player a llar. This article states the rules of Liar's Dice as follows: The first player calls out two numbers: first, how many tice on the table he or she thinks have been rolled as a number between one and six. For example, player one could say two fives, which means he or she thinks there are at least two dice that are lives among all the players dice (induding his or her own). At this point all players can accept what has been called out and move on to player two or call player one out, which will end the round and result in a winner or loser for the round If player one calls out "two fives," it does not matter whether player ane has a five or not as bluffing is allowed in Liar's Dice. It only matters if another player believes player one is bluftine and calls him or her out on it. In that instance, all dice must be revealed. If player one is correct, the player wins. If player one is wrong, then the player who called him/her out is the winner. The round is then over if player one's call is accepted, then player twa calls aut a number. The first number must be greater than what player one called. For example, if player one called out two fives." player two must call out three or higher for his or her first number, so "three fives, three fours," on four twos" would all be acceptable. "One fre" or "two sixes' would be unacceptable Gameplay continues until someone is called aut. Type here to AS ti . 6-3 Final Project Building Block Four: Programming (Reading From a File) Instructions Develop the code to solve the problem statement below. Follow these style guidelines as you develop the code. Use commenting to describe your code, and practice debugging if you run into errors. Submit your final source code. Problem Statement: Open the rule document for the game you selected for your final project: LCR Rules Farkle Rules Liar's Dice Rules Use the document to write rules for the user on how to play the game in a text file. Then, using the information from the resource articles, create a program that will read in the text file and display it out to the user. To complete this assignment, review the Programming Guidelines and Rubric document. Submissions No submissions yet Oras and drop to upload your assignment below Drobnler hen or alck Dulow Re Choistine v 11 12 ker CV11H A NI CLIT. DUSUNdegrecut 12/1812_2_ww.cl 12 bars desene Southern New Hampshire University IT 312 Liar's Dice Rules DATA Develop a program that follows the rules of Liar's Dice as described. On program start-up, it shall display the rules to the user as read from a text file submitted with the program. The user can then set up the game by entering the number of players. Any number below two shall ask the user to add more players. Once gameplay has started based on the game rules, there are a few main pieces to address Rolling the die should be performed by randomly generating the side of the die displayed for all of the dice (five per player) using a random nurnber generator. This rolling only happens once at the beginning of the game. On each player's turn, the player should be able to view his/her dice only and enter their guess into the system. Continue playing until a player decides to call liar. Then show the full set of dice and determine if the last entered guess was correct. Display a message to the game winner (the player who made the guess if it was correct, the player that called liar if the guess was not correct). Liar's Dice is a multiplayer dice game with a minimum of two players and no upper limit on the number of participants. The goal is to make a correct guess or correctly call another player a llar. This article states the rules of Liar's Dice as follows: The first player calls out two numbers: first, how many tice on the table he or she thinks have been rolled as a number between one and six. For example, player one could say two fives, which means he or she thinks there are at least two dice that are lives among all the players dice (induding his or her own). At this point all players can accept what has been called out and move on to player two or call player one out, which will end the round and result in a winner or loser for the round If player one calls out "two fives," it does not matter whether player ane has a five or not as bluffing is allowed in Liar's Dice. It only matters if another player believes player one is bluftine and calls him or her out on it. In that instance, all dice must be revealed. If player one is correct, the player wins. If player one is wrong, then the player who called him/her out is the winner. The round is then over if player one's call is accepted, then player twa calls aut a number. The first number must be greater than what player one called. For example, if player one called out two fives." player two must call out three or higher for his or her first number, so "three fives, three fours," on four twos" would all be acceptable. "One fre" or "two sixes' would be unacceptable Gameplay continues until someone is called aut. Type here to AS ti

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago

Question

Are my points each supported by at least two subpoints?

Answered: 1 week ago