Examples of Hand


Examples of javastudy.mavericks.hand.Hand

    for (int i = 0; i < 25; ++i) {
      player.add(dealer.deal());
    }

    Hand maverick = new Hand(player);

    maverick.displayHand();
    maverick.findPatHand();
    maverick.displayHand();
  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);

    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);

    assertEquals(1, hand1.compareTo(hand2));
  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    for (int i = 0; i < 5; ++i) {
      player1.add(dealer.deal());
      player2.add(dealer.deal());
      }

    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);

    System.out.println("Player1: ");
    hand1.displayHand();
    System.out.println("Player2: ");
    hand2.displayHand();

    System.out.println(hand1.compareTo(hand2));

  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);

    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);

    assertEquals(-1, hand1.compareTo(hand2));
  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);

    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);

    assertEquals(1, hand1.compareTo(hand2));

  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);
   
    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);
   
    assertEquals(-1, hand1.compareTo(hand2));
  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);
   
    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);
   
    assertEquals(1, hand1.compareTo(hand2));
  }
View Full Code Here

Examples of javastudy.poker.hand.Hand

    player2.add(card7);
    player2.add(card8);
    player2.add(card9);
    player2.add(card10);

    Hand hand1 = new Hand(player1);
    Hand hand2 = new Hand(player2);

    assertEquals(1, hand1.compareTo(hand2));
  }
View Full Code Here

Examples of org.cspoker.common.elements.hand.Hand

  protected void tearDown(){
    BasicConfigurator.resetConfiguration();
  }
 
  public void testHighCardHand() {
    Hand hand1 = new Hand();
    Hand hand2 = new Hand();

    hand1 = hand1.add(testExactCard.getExactCard(Rank.ACE, Suit.SPADES));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.KING, Suit.DIAMONDS));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.NINE, Suit.HEARTS));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.THREE, Suit.SPADES));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.EIGHT, Suit.SPADES));
    assertTrue(hand1.getShortDescription().equals(
        HandType.HIGH_CARD.getDescription()));
    TestHandQuality.logger.info(hand1.getShortDescription());

    hand2 = hand2.add(testExactCard.getExactCard(Rank.NINE, Suit.SPADES));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.KING, Suit.DIAMONDS));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.ACE, Suit.HEARTS));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.FOUR, Suit.SPADES));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.EIGHT, Suit.SPADES));
    assertTrue(hand2.getShortDescription().equals(
        HandType.HIGH_CARD.getDescription()));
    TestHandQuality.logger.info(hand2.getShortDescription());

  }
View Full Code Here

Examples of org.cspoker.common.elements.hand.Hand

    TestHandQuality.logger.info(hand2.getShortDescription());

  }

  public void testPairHand() {
    Hand hand1 = new Hand();
    Hand hand2 = new Hand();

    hand1 = hand1.add(testExactCard.getExactCard(Rank.KING, Suit.SPADES));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.KING, Suit.DIAMONDS));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.ACE, Suit.HEARTS));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.FOUR, Suit.SPADES));
    hand1 = hand1.add(testExactCard.getExactCard(Rank.SEVEN, Suit.SPADES));
    assertTrue(hand1.getShortDescription().equals(
        HandType.PAIR.getDescription()));
    TestHandQuality.logger.info(hand1.getShortDescription());

    hand2 = hand2.add(testExactCard.getExactCard(Rank.KING, Suit.SPADES));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.KING, Suit.DIAMONDS));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.ACE, Suit.HEARTS));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.FOUR, Suit.SPADES));
    hand2 = hand2.add(testExactCard.getExactCard(Rank.EIGHT, Suit.SPADES));
    assertTrue(hand2.getShortDescription().equals(
        HandType.PAIR.getDescription()));
    TestHandQuality.logger.info(hand2.getShortDescription());
  }
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.