Source of Exercise: https://github.com/ardalis/kata-catalog/blob/main/katas/Greed.md
Not very easy to understand the Kata instructions, as did not make logic sense on how they are scoring it.
Wikipedia has a easier to understand rule for the game called Farkle which is the same game.
Dice Combination | Score |
---|---|
Each 1 | 100 |
Each 5 | 50 |
Three 1s | 1000 |
Three 2s | 200 |
Three 3s | 300 |
Three 4s | 400 |
Three 5s | 500 |
Three 6s | 600 |
- Counts 1 - 6 six using above rules,
- code refactoring after above gets messy.
- made mistake in thinkly initally six 1s are allowed to score 1000, but not the case
- Count other case examples given
Correction neeed:
- Just seen that 1-6 dices talked about in the extra credit. I've started with that. Need to remove 1 dice and retest again.