Alrighty then.
Type: Posts; User: aesguitar
Alrighty then.
Here's the updated code:
package help;
import java.util.ArrayList;
public class Test {
OOOHHHH, I see what you mean. Give me a few minutes
I think that's what I did. It looks at the index, and then based off of that, it looks for the combinations afterwards.
//that's what these if statements are for
if(l<x)
{
...
}
My bad for that, before every check for a win if statement is another if statement that checks for where the index is. Do you see any outstanding issues with the code now?
It checks for that here:
if(hCard.get(l) != hCard.get(l-1)&&hCard.get(l) == hCard.get(l+1)) //checks if the next card is equal to the last and is equal to the next ...
That's what this block of code does:
int l = 0;
while( l <= hCard.size()-1)//finds the first matching pair
{
if(hCard.get(l) != hCard.get(l+1))
l++;
else
The logic I'm using is:
If there is a pair, look at the next cardB.
If cardB is not equal to cardA, then see if the next 2 cards are the same as cardB.
If they are, then it is a full...
I added comments, could you help me now?
This section of code is where I am testing the algorithm to catch a winning hand i.e. two pair, flush, straight, etc... It is able to find everything except a full house following an XXYYY pattern...