Examples of Suit


Examples of org.cspoker.common.elements.cards.Suit

    final Deck deck = Deck.createTruelyRandomDeck();
    final List<Card> list = deck.deal(52);
    for (final Card card : list) {
      final Rank rank = card.getRank();
      final Suit suit = card.getSuit();

      cardMap.put(new CardShell(rank, suit), card);
    }
  }
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

    return getCardsHighToLow();
  }

  public Suit getLongestSuit() {
    int longest = 0;
    Suit result = null;
    for (Suit suit : Suit.list) {
      if (longest < getSuitLength(suit)) {
        longest = getSuitLength(suit);
        result = suit;
      }
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

    result += ".of(" + denomination.toDebugString() + ")";
    return result;
  }

  public static Card get(String card) {
    Suit suit = Suit.get(card.toUpperCase().substring(1, 2));
    String nomination = card.toUpperCase().substring(0, 1);
    if ("2".equals(nomination)) {
      return Two.of(suit);
    } else if ("3".equals(nomination)) {
      return Three.of(suit);
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

      }

    }
    List<Suit> suitsWithAtLeast5Cards = hand.getSuitsWithAtLeastCards(5);
    if (suitsWithAtLeast5Cards.size() > 0) {
      Suit highestSuitWithAtLeast5Cards = suitsWithAtLeast5Cards.get(0).asSuit();
      if (calculator.getCombinedPoints() >= 8 && calculator.getCombinedPoints() <= 11) {
        return makeCheapestBid(highestSuitWithAtLeast5Cards);
      }
      if (calculator.getCombinedPoints() >= 12 && calculator.getCombinedPoints() <= 14) {
        Bid bid = makeCheapestBid(highestSuitWithAtLeast5Cards);
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

  }

  @Override
  protected Bid prepareBid() {
    Bid result = null;
    Suit longer = Spades.i();
    if (hand.getSuitLength(Spades.i()) < hand.getSuitLength(Hearts.i())) {
      longer = Hearts.i();
    }
    if (hand.getSuitLength(longer) < 5) {
      if (pc.getHighCardPoints() <= 7) {
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

  @Override
  protected Bid prepareBid() {
    Bid result = null;

    Suit highest = null;
    for (Suit color : Suit.list) {
      if (hand.getSuitLength(color) >= 5) {
        if (highest == null) {
          highest = color;
        } else if (hand.getSuitLength(color) > hand
View Full Code Here

Examples of org.gnubridge.core.deck.Suit

      return false;
    }
  }

  private Suit findHighestColorWithFourOrMoreCards() {
    Suit highestOver4 = null;
    for (Suit color : Suit.reverseList) {
      if (hand.getSuitLength(color) >= 4 && strongerColorHasAtLeastAsMuchHighest(color, highestOver4)
          && !color.equals(partnersOpeningBid.getTrump())) {
        highestOver4 = color;
      }
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.