write a program in c#

Concluído Postado há 7 anos Pago na entrega
Concluído Pago na entrega

Project Description:

Write a program that evaluates a single poker hand. Display the hand and print out what type it is. The ranks of hands are listed below from highest ranking to lowest ranking.

Use a structure for the card, and an array of structures for the hand. You should write a method for each type of hand, returning true if the hand fits that criterion, and false if it doesn’t.

The structure you will use should look something like the following:

public struct card

{

public char suit; // 'C', 'D', 'H', 'S' - for clubs, diamonds, hearts, and spades

public int value; //2-14 – for 2-10,Jack, Queen, King, Ace

};

struct card hand[5];

To enable you to test this program 9 data files, 1 data file for each ranking hand, are provided for you. Your program should provide a menu to allow the user to select which file will be tested. When you display the hand, you should obviously print out the cards more meaningfully. For instance, C 5 would be the 5 of clubs, S 11 would be the Jack of Spades.

Royal Flush:

• A, K, Q, J, 10 all of the same suit.

Straight Flush:

• Any five card sequence in the same suit. (Ex: 7, 8, 9, 10, J and A, 2, 3,4, 5 of same suit).

Four of a Kind:

• All four cards of the same value (Ex: J, J, J, J).

Full House:

• Three of a kind combined with a pair (Ex: K, K, K, 10, 10).

Flush:

• Any five cards of the same suit, but not in sequence.

Straight:

• Five cards in sequence, but not in the same suit.

Three of a Kind:

• Three cards of the same value (Ex. J,J,J).

Two Pair:

• Two separate pairs (Ex: A, A, 8, 8).

Pair:

• Two cards of the same [url removed, login to view] required:

C# Programming

-----------------------------------------------

Programação C#

ID do Projeto: #11475905

Sobre o projeto

4 propostas Projeto remoto Ativo em há 7 anos

Concedido a:

jackvu2612

Hi, I have 5+ years of object-oriented architecture designing, programming and administration experience with success devising software solutions to meet business requirements. - Full-stack developer with C#.NET, Ion Mais

$30 AUD em 3 dias
(15 Comentários)
3.8

4 freelancers estão ofertando em média $56 nesse trabalho

manhpham

Nice to meet you. My name is Manh from Vietnam. I am very confident that I can complete your project with best quality. Please contact me, we can chat/discuss further on your project. Manh

$88 AUD in 3 dias
(38 Comentários)
5.4
vw8325932vw

Enthusiastic Team objectives is to make a commendable contribution to the field of Computing which is vast in different sections, handle responsibility and build positive relationships with work colleagues at all level Mais

$55 AUD em 1 dia
(0 Comentários)
0.0