Greed Game Kata

The Greed Game Kata is based on the dice rolling, push-your-luck game of the same name. In that game, two or more players take turns rolling a set of 6 six-sided dice. Each turn has the player rolling the dice to try to earn points, and the player can choose to reroll some dice in a risky attempt to earn more points for that turn. We won’t be building this whole game. For now, we’ll just build a method that can determine the score of a single roll of the dice without consideration for rerolling.


Write a function to calculate the score of a given roll of 6 six-sided dice. When rolled, each die will have a result of 1, 2, 3, 4, 5, or 6. For scoring, using each die only one time, figuring out which rules will give the player the most points.

Scoring Rules




Example Score Outputs

Extra Credit

Finished the exercise early and want to add a bit more complexity?