Array and Player Review:

Simulate a yahtzee game: When a player throws 5 dice, count them and put their value into the chance box. Do this for 2 players. Communicate the dice values and chance total and total score to each player. Print the name of the winner.

Player's state (instance variable)

Player's responsibility:

Game's state: - none, it will be a static class

Game's responsibility:

Sample run of the game:

John The value of this dice is 5
John The value of this dice is 1
John The value of this dice is 6
John The value of this dice is 2
John The value of this dice is 5
John your new chance value is 19
Amy The value of this dice is 3
Amy The value of this dice is 1
Amy The value of this dice is 4
Amy The value of this dice is 4
Amy The value of this dice is 2
Amy your new chance value is 14
John You Won!

----- EXTRA1----------

Extra1: Once this works, please add the logic for determining whether a throw is a full house so you can fill in the full house score instead of chance. Have each player throw twice.

Add these methods to the player:

Change main to incorporate full house:

----- EXTRA2----------

Extra2: Put the players into a player array and adjust your game loop.

Change main to incorporate an Array of Players:

Instead of creating two player variables, create one array of 2 players. Adjust your loop to use the player index.