Need help to compare outcomes of poker dice game

I'm trying to create a poker dice game. There are comp player and user player. Each player will roll dice 5 times. Basically, it likes create 2 random array, with 5 elements in each array. I'm trying to compare the outcome of these 2 arrays. For example; 2 pairs beat 1 pair/ 3 of a kind beat 2 pair/Fullhouse beat 3 of a kind and 2 pair...

I'm stuck at the comparing part. Don't know how to do it in the shortest way.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DiceRoller
{
class Program
{
//Declare and initilize variables
static int[] userDiceCount = { 1, 1, 1, 1, 1, 0 };
static int[] userDice = { 1, 2, 3, 4, 5 };
static int[] compDiceCount = { 1, 1, 1, 1, 1, 0 };
static int[] compDice = { 1, 2, 3, 4, 5 };
//main Method runs first and contains main loop
static void Main(string[] args)
{
Console.WriteLine("Let's play some poker dice game"); //Output to inform user
userRollDice();
System.Threading.Thread.Sleep(20);
Console.WriteLine();
compRollDice();
}
//Rolls the vitual dice
static void userRollDice()
{
Random rand = new Random();//Declare and initilize random number
Array.Clear(userDiceCount, 0, 6);//Clear dice count array
Console.WriteLine("You rolled:");//Inform user what they rolled
for (int i = 0; i < userDice.Length; i++)
{
userDice[i] = rand.Next(6) + 1;//Gets a random number from 1 to 6
Console.Write("{0} ", userDice[i]); //output each dice
userDiceCount[userDice[i] - 1]++; //Increment that dice's number counter
}
Console.WriteLine();
Console.WriteLine("You have:");//Inform user
Console.WriteLine(checkHandUser());//Output results of checkHand Function
}
static void compRollDice()
{
Random rand = new Random();//Declare and initilize random number
Array.Clear(compDiceCount, 0, 6);//Clear dice count array
Console.WriteLine("Computer rolled:");//Inform user what they rolled
for (int i = 0; i < compDice.Length; i++)
{
compDice[i] = rand.Next(6) + 1;//Gets a random number from 1 to 6
Console.Write("{0} ", compDice[i]); //output each dice
compDiceCount[compDice[i] - 1]++; //Increment that dice's number counter
}
Console.WriteLine();
Console.WriteLine("Computer have:");//Inform user
Console.WriteLine(checkHandComp());//Output results of checkHand Function
}
//Determines the poker hand based on the dice the user has
static String checkHandUser()
{
//Declare and initialize local variables
String result = "Nothing";
int numberOfPairs = 0;
Boolean threeOfKind = false;
int highestCount = 0;
//Loop thorugh the counted dice list
for (int i = 0; i < userDiceCount.Length; i++)
{
if (userDiceCount[i] == 2) //If there are 2 of a dice number
{
numberOfPairs++; //Increment the amount of pairs
if (numberOfPairs >= 1 && numberOfPairs <= 2)
{//If one pair or two pairs
result = numberOfPairs + " Pair(s)"; //output the number of pairs
}
}
else if (userDiceCount[i] >= 3) //If 3 or more of a dice number
{
result = userDiceCount[i] + " of a kind"; //Output the number of a kind
if (userDiceCount[i] == 3) //If its a 3 of a kind,
{
threeOfKind = true;//set a flag to true, used to check for full house
}
}
//Check for highest number of a single dice number, used to check for straight
if (userDiceCount[i] > highestCount)
{
highestCount = userDiceCount[i];
}
}
if (threeOfKind && numberOfPairs >= 1)//if a three of a kind and a pair is found,
{
result = "Full House"; //it must be a full house
}
//if the highest amount of a dice number is 1, and there are no ones or no sixs,
if (highestCount == 1 && (userDiceCount[0] == 0 || userDiceCount[5] == 0))
{
result = "Straight"; //It must be a straight
}
return result;
}//Return the determined hand
static String checkHandComp()
{
//Declare and initialize local variables
String result = "Nothing";
int numberOfPairs = 0;
Boolean threeOfKind = false;
int highestCount = 0;
//Loop thorugh the counted dice list
for (int i = 0; i < compDiceCount.Length; i++)
{
if (compDiceCount[i] == 2) //If there are 2 of a dice number
{
numberOfPairs++; //Increment the amount of pairs
if (numberOfPairs >= 1 && numberOfPairs <= 2)
{//If one pair or two pairs
result = numberOfPairs + " Pair(s)"; //output the number of pairs
}
}
else if (compDiceCount[i] >= 3) //If 3 or more of a dice number
{
result = compDiceCount[i] + " of a kind"; //Output the number of a kind
if (compDiceCount[i] == 3) //If its a 3 of a kind,
{
threeOfKind = true;//set a flag to true, used to check for full house
}
}
//Check for highest number of a single dice number, used to check for straight
if (compDiceCount[i] > highestCount)
{
highestCount = compDiceCount[i];
}
}
if (threeOfKind && numberOfPairs >= 1)//if a three of a kind and a pair is found,
{
result = "Full House"; //it must be a full house
}
//if the highest amount of a dice number is 1, and there are no ones or no sixs,
if (highestCount == 1 && (compDiceCount[0] == 0 || compDiceCount[5] == 0))
{
result = "Straight"; //It must be a straight
}
return result;
}//Return the determined hand
}
}

Why don't you:
1) make something that is a straight, plain list of the rankings of the outcomes (like an enum, a list or another array).
2) make a function that evaluates a single hand that gives you the value or name of its particular outcome.
3) compare player1's outcome to player2's outcome.

The critical piece #1 is creating something that tells you which outcome is greater than another outcome.

Thanks to you thines01. I tried your suggestion and it worked. But my version is really long. I will post my solution as soon as I got home today. I'm so curious about your version. If you can, please post it up :)

Well, I'll post my Main() and you can determine if you want to see the rest of the project.
I also made a batch file to run it 100 times so I could see all of the outcomes (usually).
I found some really interesting ways of doing this -- most of which would be considered very complex, but they are to-the-point.
To do this justice, you would need to see the entire project (because of the way I separate functions and modules).
The actual Dice class is a separate DLL I wrote for another DaniWeb question a while back, but this Dice Poker Game uses it.

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...