- scoreMap - Static variable in class com.nisum.dice.Player
-
created map object with null value to create single object through getMap() method
In map we are going to store player_names and player_scores.
- showScore() - Method in class com.nisum.dice.Player
-
showScore() method shows score of each player and it will announce the winner
- startGame() - Method in interface com.nisum.dice.Dice
-
startGame() method signature to implement to implemented classes
- startGame() - Method in class com.nisum.dice.Player
-
startGame() method it starts the game and this method executes untill one player got 100 score
It will scan r character to role dice
roleDice() get called to get random number
updateScore() get called to update score
showScore() get called to show the update score to the players