TLP - Programming Maintenance
Week 10 - One roll of Farkle

Background

A popular party game (and phone app) is the game Farkle. You don't need to know the overall rules of Farkle to complete this assignment.  You are only going to create enough code to manage PART of one turn for one player.

As background, a full turn for one player goes like this:

  1. A player rolls six dice.
  2. It is highly likely that there will be some dice that score points.  If so
    • The player may quit their turn taking the points earned, or
    • The player may set aside one or more dice that score points and then roll the remaining dice
  3. If at anytime the player has set aside all six dice as scoring dice than they can pick up all six dice and continue scoring points by rolling all six dice.
  4. If at anytime the player rolls N dice and none of those N produce scoring dice than the player loses ALL points accumulated that round and earns a score of 0.

 

If you would like to watch a video with some sample rolls you can watch this video 

While there are multiple scoring schedules for this game, I will ask that you use this one:

Roll Combination Points Scored
Individual 1's 100 points each
Individual 5's 50 points each
Three 1's 1,000 points
Three 2's 200 points
Three 3's 300 points
Three 4's 400 points
Three 5's 500 points
Three 6's 600 points
1-2-3-4-5-6 3,000 points
Three pairs (including 4-of-a-kind and a pair) 1,500 points

 

This week we aren't going to use the table above just yet. But it will help us get started if we understand where we are going.

Task One

 

Task Two