Fork of https://github.com/google/lisp-koans so that I could go through them. THIS CONTAINS ANSWERS.

GREED_RULES.txt 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. = Playing Greed
  2. Greed is a dice game played among 2 or more players, using 5
  3. six-sided dice.
  4. == Playing Greed
  5. Each player takes a turn consisting of one or more rolls of the dice.
  6. On the first roll of the game, a player rolls all five dice which are
  7. scored according to the following:
  8. Three 1's => 1000 points
  9. Three 6's => 600 points
  10. Three 5's => 500 points
  11. Three 4's => 400 points
  12. Three 3's => 300 points
  13. Three 2's => 200 points
  14. One 1 => 100 points
  15. One 5 => 50 points
  16. A single die can only be counted once in each roll. For example,
  17. a "5" can only count as part of a triplet (contributing to the 500
  18. points) or as a single 50 points, but not both in the same roll.
  19. Example Scoring
  20. Throw Score
  21. --------- ------------------
  22. 5 1 3 4 1 50 + 2 * 100 = 250
  23. 1 1 1 3 1 1000 + 100 = 1100
  24. 2 4 4 5 4 400 + 50 = 450
  25. The dice not contributing to the score are called the non-scoring
  26. dice. "3" and "4" are non-scoring dice in the first example. "3" is
  27. a non-scoring die in the second, and "2" is a non-score die in the
  28. final example.
  29. After a player rolls and the score is calculated, the scoring dice are
  30. removed and the player has the option of rolling again using only the
  31. non-scoring dice. If all of the thrown dice are scoring, then the
  32. player may roll all 5 dice in the next roll.
  33. The player may continue to roll as long as each roll scores points. If
  34. a roll has zero points, then the player loses not only their turn, but
  35. also accumulated score for that turn. If a player decides to stop
  36. rolling before rolling a zero-point roll, then the accumulated points
  37. for the turn is added to his total score.
  38. == Getting "In The Game"
  39. Before a player is allowed to accumulate points, they must get at
  40. least 300 points in a single turn. Once they have achieved 300 points
  41. in a single turn, the points earned in that turn and each following
  42. turn will be counted toward their total score.
  43. == End Game
  44. Once a player reaches 3000 (or more) points, the game enters the final
  45. round where each of the other players gets one more turn. The winner
  46. is the player with the highest score after the final round.
  47. == References
  48. Greed is described on Wikipedia at
  49. http://en.wikipedia.org/wiki/Greed_(dice_game), however the rules are
  50. a bit different from the rules given here.