Question: Player class ( player . py ) has two attributes: a list of 3 Die objects and the player s points. 1 . _ _
Player class playerpy has two attributes: a list of Die objects and the players points.
initself constructs and sorts the list of three Die objects and initializes the
players points to
getpointsself returns the players points.
rolldiceself calls roll on each of the Die objects in the dice list and sorts the list.
haspairself returns true if two dice in the list have the same value uses
Increments points by
hasthreeofakindself returns true if all three dice in the list have the same
value uses Increments points by
hasseriesself returns true if the values of each of the dice in the list are in a
sequence ex or or or uses Increments points by
strself returns a string in the format: D D D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
