Examples of FourOfKind


Examples of com.poker.analyst.combination.FourOfKind

    }
   
    return combinations;
  }
  public static List<FourOfKind> analyse4OfKing(Set<Card> allCards, PlayingCards plCards){
    FourOfKind        comb      = null;
    List<FourOfKind>     combinations= null;         
               
    int count      = 0;
    int i = 0;
   
    CardFace cardFace = null;
   
    for (Card card: allCards){
      i++;
      if (card.getFace().equals(cardFace))       
        count++;
      else{
        if (count == 4){
          if (combinations == null) combinations = new ArrayList<FourOfKind>();
          comb = new FourOfKind();
          comb.setCombinationList(PairAnalyzer.getListOfCardsByFace(allCards,cardFace));
          combinations.add(comb);
        }
        cardFace = card.getFace();
        count = 1;
      }       
    }   
    if (count == 4){
      if (combinations == null) combinations = new ArrayList<FourOfKind>();
      comb = new FourOfKind();
      comb.setCombinationList(PairAnalyzer.getListOfCardsByFace(allCards,cardFace));
      combinations.add(comb);
    }
   
    return combinations;
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.