nvm, got it.
|
Trying to do my java homework but this this issue
public boolean hasOnePair(PokerHand tester){
for(int i=0;i<tester.getCardCount();i++){
for(int v=1;v<tester.getCardCount();v++) {
if(tester.getCard(i).getValue()!=tester.getCard(v) .getValue())
return false;
}
}
return true;
}
}
It always returns false, regardless.
this is a hand of cards(5)
Whats the issue?
nvm, got it.
You have been Java Homework for a Reason, to make you think and fix Errors yourself.
Only ask for help when you are absolute 0.
Also, the problem was the if statement was true and returned the boolean as false.
if(tester.getCard(i).getValue()!=tester.getCard(v) .getValue())
return false;
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |