Example #1
0
 public void testCardMaskString() {
   long mask = maskAs | maskAh | mask2h;
   assertEquals("As Ah 2h", Deck.cardMaskString(mask));
   assertEquals("AsAh2h", Deck.cardMaskString(mask, ""));
   assertEquals("As Ah 2h", Deck.cardMaskString(mask, " "));
   assertEquals("As/Ah/2h", Deck.cardMaskString(mask, "/"));
 }
Example #2
0
 /** A simple demonstration of AsianStudEval methods. */
 public static void main(String[] args) {
   int[] ranks = new int[5];
   int[] suits = new int[5];
   ranks[0] = Deck.RANK_ACE;
   suits[0] = Deck.SUIT_HEARTS;
   ranks[1] = Deck.RANK_7;
   suits[1] = Deck.SUIT_HEARTS;
   ranks[2] = Deck.RANK_8;
   suits[2] = Deck.SUIT_HEARTS;
   ranks[3] = Deck.RANK_9;
   suits[3] = Deck.SUIT_SPADES;
   ranks[4] = Deck.RANK_TEN;
   suits[4] = Deck.SUIT_SPADES;
   long mask = Deck.createCardMask(ranks, suits);
   System.out.println("In Java: cards=[" + Deck.cardMaskString(mask) + "]");
   try {
     long hival = EvalHigh(ranks, suits);
     System.out.println("In Java: hival=" + hival + "\n");
   } catch (Exception e) {
     System.out.println("In Java: caught exception: " + e);
   }
 }