Package com.poker.analyst.element

Examples of com.poker.analyst.element.Card


       
        //кто-то ререйзнул
        List<CardValue> cardvalues;
        if (wasRaiseHero ){
          if (dfs.getPlayerMoney() > board.getPlayers().get(board.getHero()).getBet()){
            if (availcomb.getAllCards().contains(new Card(Suit.clubs, CardFace.ACE)) ||
            availcomb.getAllCards().contains(new Card(Suit.diamonds, CardFace.ACE)) ||
            availcomb.getAllCards().contains(new Card(Suit.spades, CardFace.ACE)) ||
            availcomb.getAllCards().contains(new Card(Suit.hearts, CardFace.ACE))){
             
           
              if (topCombination instanceof Pair){
                // if pair is middle && Ace exists => fold
                //cardvalues = act.getCardValuesFromComb(topCombination, hand);               
View Full Code Here


        final List<Card> cardsList = new ArrayList<Card>(52);
        for (final Suit suit : Suit.values()) {         
          if (suit.equals(Suit.forAnalyse)) continue;
            for (final CardFace cardFace : CardFace.values()) {
                cardsList.add(new Card(suit, cardFace));
            }
        }
        return cardsList;
    }
View Full Code Here

    private static Card getCard() {

        final Random random = new Random(new Date().getTime());
        final int number = random.nextInt(cardsList.size());
        final Card card = cardsList.get(number);
        cardsList.remove(number);
        return card;
    }
View Full Code Here

    }
    public static Card getCard(List<Card> cardsList) {

        final Random random = new Random(new Date().getTime());
        final int number = random.nextInt(cardsList.size());
        final Card card = cardsList.get(number);
        cardsList.remove(number);
        return card;
    }
View Full Code Here

            return null;
        }
        final CardFace face = CardFace.getCardFaceFromShortName(comb.charAt(0));
        final Suit suit = Suit.getSuitFromShortName(comb.charAt(1));
        if (suit != null && face != null) {
            return new Card(suit, face);
        }
        return null;

    }
View Full Code Here

    @Override
  public List<CardValue> getCardValues(Hand hand) {
    List<CardValue> listCardValues = null;
    CardValue cardValue;
    Card plCard;
       
    CardFace cface = getMinValue();
    for (int q = 0; q<2 ; q++){
      plCard = hand.getHandCards()[q];
      if (cface.equals(plCard.getFace())){
        if (listCardValues == null) listCardValues = new ArrayList<CardValue>();
        cardValue = new CardValue();
        cardValue.setCard(plCard);
        cardValue.setCardPosition(0);
        cardValue.setCardRange(CardRangeInComb.TOP);
View Full Code Here

    @Override
  public List<CardValue> getCardValues(Hand hand) {
    List<CardValue> listCardValues = null;
    CardValue cardValue;
    Card plCard;
       
    CardFace cface = getMinValue();
    for (int q = 0; q<2 ; q++){
      plCard = hand.getHandCards()[q];
      if (cface.equals(plCard.getFace())){
        if (listCardValues == null) listCardValues = new ArrayList<CardValue>();
        cardValue = new CardValue();
        cardValue.setCard(plCard);
        cardValue.setCardPosition(0);
        cardValue.setCardRange(CardRangeInComb.TOP);
View Full Code Here

  }
  @Override
  public List<CardValue> getCardValues(Hand hand) {
    List<CardValue> listCardValues = null;
    CardValue cardValue;
    Card plCard;
    Card cardFromList;
     
    List<Card> listCardComb = getCombinationList();
    CardFace cface = getMinValue();
    for (int i = 0; i< listCardComb.size(); i++){
      cardFromList = listCardComb.get(i);
      for (int q = 0; q<2 ; q++){
        plCard = hand.getHandCards()[q];
        if (cardFromList.getFace().equals(plCard.getFace())){
          if (listCardValues == null) listCardValues = new ArrayList<CardValue>();
          cardValue = new CardValue();
          cardValue.setCard(plCard);
          cardValue.setCardPosition(i);
          cardValue.setCardRange(CardRangeInComb.TOP);
View Full Code Here

            return null;
        }
        final CardFace face = CardFace.getCardFaceFromShortName(comb.charAt(0));
        final Suit suit = Suit.getSuitFromShortName(comb.charAt(1));
        if (suit != null && face != null) {
            return new Card(suit, face);
        }
        return null;

    }
View Full Code Here

//    return new PlayingCards(heroCard, tableCard);

 

    PlayingCards plCards = new PlayingCards();
    plCards.setPlayerCards(new Card[]{new Card(Suit.clubs,CardFace.FIVE),
                           new Card(Suit.clubs,CardFace.SIX)});

    plCards.setTableCards(new Card[]{new Card(Suit.clubs,CardFace.SEVEN),
                     new Card(Suit.clubs,CardFace.FOUR),
                     new Card(Suit.hearts,CardFace.QUEEN)/*,                    
                     new Card(Suit.hearts,CardFace.QUEEN),
                     new Card(Suit.diamonds,CardFace.ACE)*/});

       
    return plCards;
View Full Code Here

TOP

Related Classes of com.poker.analyst.element.Card

Copyright © 2018 www.massapicom. 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.