Question
Develop a program that follows the rules of Liars Dice as described. On program start-up, it shall display the rules to the user as read
Develop a program that follows the rules of Liars 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 number generator. This rolling only happens once at the beginning of the game. On each players 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). Liars 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 liar. This article states the rules of Liars Dice as follows: The first player calls out two numbers: first, how many dice 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 fives among all the players dice (including his or her own). o 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 one has a five or not as bluffing is allowed in Liars Dice. It only matters if another player believes player one is bluffing 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 ones call is accepted, then player two calls out 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, or four twos would all be acceptable. One five or two sixes would be unacceptable. Game play continues until someone is called out.
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