Dice Game
Dice Game
You have been tasked with creating a dice rolling game using object-oriented
programming principles. The game should simulate rolling dice and keep track of the
scores of multiple players. Each player will take turns rolling the dice and
accumulating points based on the outcome of the roll.
1. A Player will have a name, score and a password as attributes. The program needs
to access the attributes whenever required.
2. The Dice will have a number of sides, the current value selected and contain the
following:
• The number of sides of the dice needs to be specified when a new dice is created.
• The program needs to read the selected value of the dice when it is rolled
• When the dice is rolled the selected value should be between 1 and the number of
sides of the dice
• The Game can have any number of players joined with the game. The program should
be able to use methods to add new players, user login before they roll the dice for
each and every dice and signout from the game when needed. It needs to display the
scores of each player.
• The program should be able to simulate rounds of the game where each player
joined with the game takes turns rolling the dice and updating scores accordingly.
You need to design a scoring schema for the game and a set of rules to be used in
the game.
• The game needs to use a Dice, so it can be used in the game by each player to
roll it and update their score. You can use your own ideas to provide bonus scores
or punishments according to the value selected after each roll
• You are required to use at least one instance of a non-human player and simulate
all the activities performed by human players like participating in rounds and
rolling the dice etc.
Deliverables:
Note: You can extend the assignment by adding more features to the game, such as
customizing the number of dice, setting a winning condition etc.