Thanks Bear for your reply.What I meant to say was the following:
I have a method like shown below:
public boolean isSameRank(Card cardA,Card cardB,Card cardC,Card cardD,Card cardE){
if((cardA.getRank()==cardB.getRank())&&(cardB.getRank()==cardC.getRank())&&(cardC.getRank()==cardD.getRank())&&(cardD.getRank()==cardE.getRank())){
return true;
}
return false;
}
The goal here is to find out if there are atleast 3 cards here with the same rank.Instead of adding more AND OR Clauses to the code shown above,is there a better way of doing things.
Please advise.
Thanks
Chris