oop - How to identy a Poker hand in c++ -
i have assignment in need identify hand of texas hold em
here assignment: http://www.scribd.com/doc/142850594/proj1
and here code: http://pastebin.com/ts387idw
what don't quite understand how program read file ,with hands in it, or how should sort through , identify hand.
if told me design program scratch no guidelines, have done assign 52 cards uniquie id, define type of hand royal flush, , use if statement see if ids match defined type of hand. however, have gut feeling considerably less efficient manner professor demonstrated in assignment (he professor after all). appreciated, thanks!
so, have 2 problems:
1. reading hands file
2. identifying ranks of hands
for first problem need:
1. read file line-by-line
2. parse strings. can notice, cards have same pattern within hand: letter plus 1 or 2 digits followed other cards. in case can split string manually based on switch between digits , letters.
for second problem there no common ways. in cases need check each possible rank manually.
Comments
Post a Comment