C#代写:CAB201 Yahtzee Rules

Introduction

这次需要代写的作业是Yahtzaa的游戏规则,包括得分部分逻辑以及胜利条件。

Object of the Game

To roll 13 different dice combinations and match them to the 13 scoring categories in the game.

Playing the Game

On your turn, roll the dice up to three times trying to obtain one of the possible scoring combinations. There are two scoring sections, Upper Section and Lower Section. There are six scoring combinations in the Upper Section and seven scoring combinations in the Lower Section.
You can complete the combinations in any order, but you must choose one combination to score after each turn. When you have completed all the combinations, your scores will be totalled along with any bonus points earned during the game to produce a Grand Total. The player with the highest Grand Total is the winner.
You can play Yahtzee with a maximum number of six (6) players, or if you prefer you can play on your own, trying for the highest possible score.

Rolling the Dice

  1. Players take turns to roll the dice
  2. On your turn, you are allowed a maximum of three rolls of the dice, although you may stop after the first or second roll.
  3. For the first roll, ROLL ALL THE DICE.
  4. For the second or third roll, you may roll ANY or ALL of the dice again or select a scoring combination.
  5. If you have a third roll you must choose a combination to score.

Basic Scoring

The score combinations are made up of two Sections Upper and Lower.

Upper Section

You can achieve scores for the following in Upper Section

Count 1s to 6s

Roll one or more of a die value eg. roll one or more 1s. When you choose the Ones combination, all the 1s you have rolled will be counted as your score. Roll one or more 2s and choose the Twos combination. All the 2s you have rolled will be added up as your score, and so on for 3s to 6s.
For example, if you rolled the following: 3 2 5 3 1 on the five dice, and you chose the Threes combination, then you would score 6 points. Alternatively, this same roll would score 5 for Fives (because you may have selected Threes already), or 0 for Fours (you may have selected all of the others, or prefer not to select them).

Lower Section

The Lower Section has a range of special scoring combinations:

3 of a Kind

Roll three matching numbers and any two other numbers. Your score will be the total of all five dice. For example if you rolled 3 4 3 3 6 then you would score 19 points.

4 of a Kind

Roll four matching numbers and any other number. Your score will be the total of all five dice. For example, if you rolled 5 1 5 5 5 then you would score 21 points.

Full House

Roll three of a kind and two of a kind. A Full House always scores 25 points. For example, if you rolled 5 4 4 5 5 then you have a Full House and you would score 25 points.

Small Straight

Roll a sequence of four numbers and one other number (in any order of the dice face values). You could roll a sequence of four numbers 2,3,4,5. Other possibilities include 1,2,3,4 or 3,4,5,6. A Small Straight always scores 30 points. For example, if you rolled 2 5 3 4 3 then you have a Small Straight and you would score 30 points.

Large Straight

Roll of sequence of five numbers. You could roll a sequence of five numbers 1 2 3 4 5 or 2 3 4 5 6 (in any order). A Large Straight always scores 40 points. For example, if you rolled 1 5 2 4 3 then you have a Large Straight and you would score 40 points. A Large Straight may instead be scored as 30 points as a Small Straight you have previously selected the Large Straight scoring option.

Yahtzee

Roll 5 of a kind. Yahtzee always scores 50 points. For example, if you rolled five 3s, then you have a Yahtzee and you score 50 points.

Chance

A Chance combination is made up of any combination of the five dice values. A Chance Combination scores the total of the five dice. Use the Chance combination when you throw a combination that you have already scored in the game, or when you cannot use any other available combination.

Scoring Options

This is where you can apply skill and strategy. When you play Yahtzee, you decide which combination you wish to score. This will depend on your individual strategy. But, remember you can only choose each scoring combination once in a game. Your objective is to attempt every scoring combination with the highest possible number of points.
Example: Suppose that after your third throw your dice show: 3 3 3 5 5. The following scoring options are possible:

Threes       Score 9 points (total of threes only)
Fives        Score 10 points (total of fives only)
3 of a Kind  Score 19 points (total of all dice)
Full House   Score 25 points
Chance       Score 19 points (total of all dice)

The Zero Option

As the game progresses, you may find that all possible scoring combinations have been used. In this case, you have to choose a combination that will result in a score of zero. Remember, you must choose one scoring combination on every turn.
In the example above, if the scoring combinations for all those listed were already filled, you must choose another combination and get a result of zero points.

The Upper Section Bonus

By scoring 63 or more points in the Upper Section, you receive a bonus of 35 points in the Bonus for 63+ scoring option in the Upper Section Note: If you were to score a minimum of three of a kind in each of the six combinations in the Upper Section, you will have 63 points.

Yahtzee Bonus

If you have rolled a Yahtzee and scored 50 points, you can score a Yahtzee Bonus, worth 100 points, for a second or subsequent Yahtzee. However, if you scored a zero for the Yahtzee combination, you won’t be entitled to Yahtzee Bonus points when you throw any subsequent Yahtzees. If you have thrown a second or subsequent Yahtzee and are eligible for Yahtzee Bonus points, 100 points will automatically be added to your score in the Yahtzee Bonus total.
NOTE: This rule will only be implemented as part of the advanced version of the game.

Yahtzee Jokers

If you’ve completed the Yahtzee scoring combination already (with either a 50 or a zero), you can still take advantage if you roll a Yahtzee later in the game. Providing the appropriate combination in the Upper Section has already been completed. (NOTE: If the appropriate scoring combination in the Upper Section has not already been completed, the Yahtzee cannot be played as a joker, but must be treated as a conventional throw.
For example, if the Yahtzee you’ve just rolled consists of five 4s and the Fours scoring combination has already been completed, you can use this Yahtzee to score points for any of the following combinations:

3 of a Kind, 4 of a Kind or Chance Score the total of the five dice
Full House Score 25 points
Small Straight Score 30 points
Large Straight Score 40 points

If all the combinations in Lower Section have been selected, choose a scoring combination from any others of those remaining in the Upper Section and score the points according to the rules for that scoring combination.
NOTE: This rule will only be implemented as part of the advanced version of the game.

Adding Up Your Scores

The Grand Total for each game is made up in the following way:

  1. Total of the six scoring combinations in the Upper Section plus
  2. 35 bonus points if the sub-total score of Upper Section is 63 or more plus
  3. Any Yahtzee Bonus points scored plus
  4. Total of the seven scoring combinations in the Lower Section.

Winning the Game

When all players have completed their 13 scoring combinations the game is over, the scores are added up with any bonus points. The winner of the game is the player with the most points.

Strategy

Here are some useful strategy hints to help you win:

Upper Section

Try to gain the 35 bonus points by scoring 63 points or more in the Upper Section early in the game, as you may be forced to enter a zero towards the end of the game.
If you have to, choose to score a zero for the Ones scoring combination, as this may be compensated for by throwing more than three 3s, 4s, 5s or 6s in the Upper Section and still reach the 63 point mark to gain the 35 bonus points.

Lower Section

Try to leave your Chance scoring combination until late in the game, as your options will inevitably become fewer.
If the game is nearly over, you may choose to score a zero for the Yahtzee scoring combination, or one of the other difficult combinations. However, if your opponents have already completed these scoring combinations, your only option may be to gamble on a great throw!

Basic and Advanced Rules

The rules shown above are all the rules for the Yahtzee game. For our implementation of the game, there will be a basic version and advanced version. In the basic version the Yahtzee Bonus and Yahtzee Jokers rules will not be included. These rules will be implemented as part of the advanced version of the game.