using System.Collections.Generic;
public static void Main()
Console.WriteLine("The highest score is: " + dice.GetHighestScore());
public int Ones { get; set; }
public int Twos { get; set; }
public int Threes { get; set; }
public int Fours { get; set; }
public int Fives { get; set; }
public int Sixes { get; set; }
public int Sevens { get; set; }
public int Eights { get; set; }
public int ThreeOfAKind { get; set; }
public int FourOfAKind { get; set; }
public int AllOfAKind { get; set; }
public int NoneOfAKind { get; set; }
public int FullHouse { get; set; }
public int SmallStraight { get; set; }
public int LargeStraight { get; set; }
get { return Ones + Twos + Threes + Fours + Fives + Sixes + Sevens + Eights; }
int[] result = new int[5];
Random rand = new Random();
for (int i = 0; i < 5; i++)
int randNum = rand.Next(1, 9);
private void GetScore(int[] arr)
for (int i = 0; i < arr.Length; i++)
private Dictionary<int,int> GetOccurances(int [] arr)
Dictionary<int, int> occurances = new Dictionary<int, int>();
for (int i = 0; i < arr.Length; i++)
occurances.Add(key, counter);
occurances.Add(key, counter);
private int GetNumberOfDiceInSequence(int [] arr)
for (int i = 0; i < arr.Length-1; i++)
int diff = next - current;
private void AnalyzeScore(int [] arr)
var occurances = GetOccurances(arr);
if (occurances.ContainsValue(5))
if (occurances.ContainsValue(4))
if (occurances.ContainsValue(3))
if (occurances.ContainsValue(3) && occurances.ContainsValue(2))
if (GetNumberOfDiceInSequence(arr) == 4)
if (GetNumberOfDiceInSequence(arr) == 5)
public int GetHighestScore()
int[] allValues = new int[15] {Ones, Twos, Threes, Fours, Fives, Sixes, Sevens, Eights, ThreeOfAKind, FourOfAKind, AllOfAKind, NoneOfAKind, SmallStraight, LargeStraight, Chance };