From 999b5e73b0ea91d993f7000555d16b779cf4b6f8 Mon Sep 17 00:00:00 2001 From: Nate Adams Date: Sun, 15 Dec 2019 10:29:45 -0600 Subject: [PATCH] Implement IsFiveOfAKind check --- .../DiceGame/Extensions/DieExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GettingStartedWithInterfacesAndMocks/DiceGame/Extensions/DieExtensions.cs b/GettingStartedWithInterfacesAndMocks/DiceGame/Extensions/DieExtensions.cs index 88f163f..f7dfa14 100644 --- a/GettingStartedWithInterfacesAndMocks/DiceGame/Extensions/DieExtensions.cs +++ b/GettingStartedWithInterfacesAndMocks/DiceGame/Extensions/DieExtensions.cs @@ -19,7 +19,7 @@ public static bool IsFiveOfAKind(this IEnumerable dice) throw new ArgumentException("A valid roll must contain exactly five dice"); } - throw new NotImplementedException(); + return dice.GroupBy(d => d.Value).Count() == 1; } } }