Reading poker hands in from text file and determining winner

Posted 22 September 2008 - 09:40 PM

I have been working on this and I'm not sure how I can use what I take from my .txt file and use it in the rest of the code. The specifics for what I am trying to do are.... reads poker hands 2 at a time, and determines which player has a better hand. I feel comfortable figuring out how to write the code determining which player has a better hand but I am unsure how to get the actual card values from my .txt file. Here is what I have.....

Re: Reading poker hands in from text file and determining winner

Posted 23 September 2008 - 01:44 AM

First of all, you have to know what you have written in that .txt file. You can have written 13-Spades for king of spades, or you can have it written in 10 other ways. Now that you know how the cards are written (you can determine which card is in a string), you can make new class representing a single Player.