Reflection 2.4 - Designing Farkle
Preparing to Design and Code

Prior to meeting with your team

For this activity we are going to ask you to "pair program" with your team to create code that would be part of a larger Farkle program.  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 one turn for one player.

A full single turn 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.

 

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

 

 

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

 

 

Prior to meeting with your team you should take the time to understand the game explained above. Once you do, take some time to write the pseudocode for the player's opening roll only.  That is, write pseudocode that would roll all six dice and calculate their opening score based on the table above.

You should use the good design principles we have been considering the last few weeks - functions/modularization, variable names, clean code, etc. 

While you do not need to have working python code at this point, you should think through the code carefully enough that your pseudocode is relatively complete and that you are ready to start coding