{ "exercise":"yacht", "version":"1.1.0", "comments":[ "The dice are represented always as a list of exactly five integers", "with values between 1 and 6 inclusive. The category is an string.", "the categories are 'ones' to 'sixes',", "Then 'full house',", " 'four of a kind'", " 'little straight' 1-5", " 'big straight' 2-6", " 'choice', sometimes called Chance", " 'yacht', or five of a kind" ], "cases":[ { "description":"Yacht", "property":"score", "input":{ "dice":[5, 5, 5, 5, 5], "category":"yacht" }, "expected":50 }, { "description":"Not Yacht", "property":"score", "input":{ "dice":[1, 3, 3, 2, 5], "category":"yacht" }, "expected":0 }, { "description":"Ones", "property":"score", "input":{ "dice":[1, 1, 1, 3, 5], "category":"ones" }, "expected":3 }, { "description":"Ones, out of order", "property":"score", "input":{ "dice":[3, 1, 1, 5, 1], "category":"ones" }, "expected":3 }, { "description":"No ones", "property":"score", "input":{ "dice":[4, 3, 6, 5, 5], "category":"ones" }, "expected":0 }, { "description":"Twos", "property":"score", "input":{ "dice":[2, 3, 4, 5, 6], "category":"twos" }, "expected":2 }, { "description":"Fours", "property":"score", "input":{ "dice":[1, 4, 1, 4, 1], "category":"fours" }, "expected":8 }, { "description":"Yacht counted as threes", "property":"score", "input":{ "dice":[3, 3, 3, 3, 3], "category":"threes" }, "expected":15 }, { "description":"Yacht of 3s counted as fives", "property":"score", "input":{ "dice":[3, 3, 3, 3, 3], "category":"fives" }, "expected":0 }, { "description":"Sixes", "property":"score", "input":{ "dice":[2, 3, 4, 5 ,6], "category":"sixes" }, "expected":6 }, { "description":"Full house two small, three big", "property":"score", "input":{ "dice":[2, 2, 4, 4, 4], "category":"full house" }, "expected":16 }, { "description":"Full house three small, two big", "property":"score", "input":{ "dice":[5, 3, 3, 5, 3], "category":"full house" }, "expected":19 }, { "description":"Two pair is not a full house", "property":"score", "input":{ "dice":[2, 2, 4, 4, 5], "category":"full house" }, "expected":0 }, { "description":"Four of a kind is not a full house", "property":"score", "input":{ "dice":[1, 4, 4, 4, 4], "category":"full house" }, "expected":0 }, { "description":"Yacht is not a full house", "property":"score", "input":{ "dice":[2, 2, 2, 2, 2], "category":"full house" }, "expected":0 }, { "description":"Four of a Kind", "property":"score", "input":{ "dice":[6, 6, 4, 6, 6], "category":"four of a kind" }, "expected":24 }, { "description":"Yacht can be scored as Four of a Kind", "property":"score", "input":{ "dice":[3, 3, 3, 3, 3], "category":"four of a kind" }, "expected":12 }, { "description":"Full house is not Four of a Kind", "property":"score", "input":{ "dice":[3, 3, 3, 5, 5], "category":"four of a kind" }, "expected":0 }, { "description":"Little Straight", "property":"score", "input":{ "dice":[3, 5, 4, 1, 2], "category":"little straight" }, "expected":30 }, { "description":"Little Straight as Big Straight", "property":"score", "input":{ "dice":[1, 2, 3, 4, 5], "category":"big straight" }, "expected":0 }, { "description":"Four in order but not a little straight", "property":"score", "input":{ "dice":[1, 1, 2, 3, 4], "category":"little straight" }, "expected":0 }, { "description":"No pairs but not a little straight", "property":"score", "input":{ "dice":[1, 2, 3, 4, 6], "category":"little straight" }, "expected":0 }, { "description":"Minimum is 1, maximum is 5, but not a little straight", "property":"score", "input":{ "dice":[1, 1, 3, 4, 5], "category":"little straight" }, "expected":0 }, { "description":"Big Straight", "property":"score", "input":{ "dice":[4, 6, 2, 5, 3], "category":"big straight" }, "expected":30 }, { "description":"Big Straight as little straight", "property":"score", "input":{ "dice":[6, 5, 4, 3, 2], "category":"little straight" }, "expected":0 }, { "description":"Choice", "property":"score", "input":{ "dice":[3, 3, 5, 6, 6], "category":"choice" }, "expected":23 }, { "description":"Yacht as choice", "property":"score", "input":{ "dice":[2, 2, 2, 2, 2], "category":"choice" }, "expected":10 } ] }