Yahtzee Rails Application

Cancelled Posted Feb 10, 2016 Paid on delivery
Cancelled Paid on delivery

Yahtzee

This code test is to make a program that plays Yahtzee.

The choice of user interface is up to you, (some acceptable answers are, console, GUI, Web UI, anything else you can think of).

The logic of the game should be full tested using your testing tool of choice.

Attention should be paid to code quality and structure. You can use whatever paradigms, patterns, and techniques you think are appropriate. Readability, understandability, maintainability, extensabillity, and correctness should be your primary focus, (whatever those things mean to you).

Rules / Domain

The rules of Yahtzee are not complex. On your turn, you roll five dice. If desired, you make pick up any number of them and re-roll. You're allowed up to two re-rolls or three total rolls counting the original toss. When you're finished rolling, you score the roll in any "category" you like.

A game of Yahtzee is 13 turns. Sometimes players play alone to see how good of a score they can get. Other times, they play against others: High score wins.

Yahtzee has thirteen categories where you can place a score, one for each roll. The categories are divided into two sections. The "top" section (located on the top half of the score card) contains: Ones, Twos, Threes, Fours, Fives and Sixes. To score in those categories, you simply count the total of all dice matching the name.

The "bottom" categories are more varied. There is a Three of a Kind and Four of a Kind. To score in either of those you need the indicated three or four of any one number shown on the dice. As long as you have the needed duplicates, you score the total of all your dice.

There is a category for a Full House, worth 25 points. This requires two of one number and three of another to be shown on the dice.

There's also Small Straight and Large Straight. They require a sequence to be shown on the dice. For example, 2, 3, 4 and 5 can be a Small Straight. The Small Straight requires a run of at least four dice and is worth 30 points. Large Straight requires all five dice to be in order and is worth 40 points.

The supreme category is the Yahtzee. This requires a five of a kind roll. All dice must show the same number. When you have that, you can score 50 points here.

If you roll more than one Yahtzee in a game, after scoring the first one for 50, the subsequent Yahtzees give you a 100 bonus point each. You must still count these Yahtzees somewhere; either in the top for the appropriate number or if that is full, it can be used as a wildcard for any category in the bottom, scored normally.

Finally, there's is a catch-all Chance category. You can score any roll here simply by totaling all the dice.

You must score each and every roll in exactly one category. This means it is common to "scratch" categories late in the game, when you cannot get the right combination. A scratch is worth zero points.

When the categories are filled in, the top and bottom are totaled separately. If the top is greater than or equal to 63 points, you add in a 35 point "bonus". The two section totals are then combined to give the overall score.

That's all there is to Yahtzee

Ruby on Rails

Project ID: #9620625

About the project

Remote project Active Feb 10, 2016