Kata: Yahtzee

Kata: Yahtzee

Yahtzee is a classic dice game. The object is to score the most points in a game. To score, a player rolls 5 6-sided dice. The player can choose to re-roll all or some of their dice up to three times. The player decides on a scoring category for their roll. Points for that award are based on the compatibility of the roll results. When all the categories are scored, the game is over. The player with the most points wins.

Yahtzee rules, according to Wikipedia: https://en.wikipedia.org/wiki/Yahtzee

Noob: Write an algorithm, in pseudocode and as a flowchart, that outlines how a Yahtzee game would be programmed. The flowchart may need to be broken up in to multiple sections for clarity.

XP: 50 points

Code Monkey: Complete the Noob level. Build on that by creating a HTML/JavaScript-based version of the Yahtzee game. This program would rely on the user providing most of the decision-making (i.e. selecting which category to score a round in). The program would need to display the score for the round for the selected category and the updated total score after each round. This game would also be a ‘solitaire’ version with users playing against themselves. A round would include three rolls and a category choice for scoring. The game is over when all categories are scored.

XP: 100 points

King Code: Complete the Noob and Code Monkey levels. Add to the Code Monkey level a multiplayer option where each player takes a turn. The user can select the number of players and players’ names at the start of the game. The game needs to keep track of and display each players’ score for the round and total score. It also needs to keep track of which player is currently playing. The winning player is indicated at the end of the game.

XP: 150 points

Unicorn: Complete the King Code level. Add to that some decision-making capability to the game. The game displays the possible score for each category, based on the current roll and highlights the highest-scoring category. Already scored categories should be excluded. Additionally, the game (computer) can play as one of the players.

XP: 200 points

Due Date

Leave a Reply

Your email address will not be published. Required fields are marked *