C++ Coding Problem: Poker Program I must write a program that will figure out the value of a hand of 3 cards. I can use if statements, and if else, and other things of that nature. I must generate three random numbers, for the 3 cards, while making sure they are not duplicates....then i must find a way to label the cards by rank and suit somehow, from 1 - 52. The program should function like a poker game, the user is dealt three random cards, and it should tell the user what type of hand they have (straight, flush, etc.)....And I must loop the whole thing so the user can elect to play again.
I am a beginner so i do not kno much about c++, and im struggling with this one greatly, i have to get it done within 24 hours, and im lost right now.
What i have been able to do:
write if statements that print to the screen saying, card 1 is this suit, and then later saying, card 1 is this rank. i dont know how to combine them saying, card1 is a 2 of hearts, etc.
I thought i would have trouble with determining the different hands, such as straights and stuff, but i havent even got that far...i just have a mess of code testing the waters to see wut i kno how to do....
if necessary, i will post my code, but i wont unless asked because it is not close in any manner to being what i want it to be.
Please, some advice? clues? Im really lost, and time is of the essence. Thanks in advance for all those who will be helping me here. |