I am trying to use the program to find out which hand you are playing poker. The template object that I create is in a format for checking five cards, each of which is determined by a value, and then a suit. So, for example, an ace of spades will be designated as As. I have the following code for recognizing a straight line, but it only works in order. How can I recognize a line 5d4sAc3s2has straight? Thanks for any help!
Pattern[] floppedStraightCheck;
floppedStraightCheck = new Pattern[10];
floppedStraightCheck[0] = Pattern.compile("(([aA][scdhSCDH])([2][scdhSCDH])([3][scdhSCDH])([4][scdhSCDH])([5][scdhSCDH])");
source
share