Develop a program that follows the rules of Left Center Right (LCR) 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 three 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 each of the  three using a random number generator. For this game, if the generated number is 1, that will be L.  Additionally, 2 is R, 3 is C, and 4–6 are dots that can be represented with the asterisk symbol *. Be sure to  check the current player’s number of chips before rolling. After each player’s roll, calculate the number of  chips for players based on the actions dictated by the dice. Continue playing until only one player has  chips. Display a message to the game winner.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Develop a program that follows the rules of Left Center Right (LCR) 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 three 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 each of the 
three using a random number generator. For this game, if the generated number is 1, that will be L. 
Additionally, 2 is R, 3 is C, and 4–6 are dots that can be represented with the asterisk symbol *. Be sure to 
check the current player’s number of chips before rolling. After each player’s roll, calculate the number of 
chips for players based on the actions dictated by the dice. Continue playing until only one player has 
chips. Display a message to the game winner.
Left Center Right (LCR) is a multiplayer dice game with a minimum of three players, but no upper limit 
on the number of participants. The goal is to win all of the chips.
The Dice
● There are three dice rolled each turn. Each die has the letters L, C, and R on it along with dots on 
the remaining three sides. These dice determine where the player’s chips will go.
○ For each L, the player must pass one chip to the player sitting to the left.
○ For each R, the player must pass one chip to the player sitting to the right.
○ For each C, the player must place one chip into the center pot and those chips are now 
out of play.
○ Dots are neutral and require no action to be taken for that die.
The Chips
● Each player will start with three chips.
● If a player only has one chip, he/she rolls only one die. If a player has two chips left, he/she rolls 
two dice. Once a player is out of chips, he/she is still in the game (as he/she may get chips 
passed to him/her), but passes the dice to the next player.
Winning the Game
● The winner is the last player with chips

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education