Exemplo n.º 1
0
static void 
doPairValueTable(void) {
  int i;

  MakeTable_begin("evxPairValueTable", 
                  PV_FILENAME, 
                  "uint32", 
                  StdDeck_N_RANKMASKS);
  MakeTable_comment(PV_COMMENT_STRING);
  for (i=0; i < StdDeck_N_RANKMASKS; i++) {
    uint32 retval, cards, temp;

    cards = i;
    retval = top_bit_func(cards);
    cards ^= retval;
    temp = top_bit_func(cards);
    retval ^= temp;
    cards ^= temp;
    retval |= top_bit_func(cards) 
              | EvxHandVal_ONEPAIR;

    MakeTable_outputUInt32(retval);
  };

  MakeTable_end();
}
Exemplo n.º 2
0
static void 
doTopTwoBitsTable(void) {
  int i;

  MakeTable_begin("topTwoBitsTable", 
                  T2B_FILENAME, 
                  "uint32", 
                  StdDeck_N_RANKMASKS);
  MakeTable_comment(T2B_COMMENT_STRING);
  for (i=0; i < StdDeck_N_RANKMASKS; i++) {
    uint32 retval, n;

    n = i;
    retval = top_bit_func(n);
    n ^= retval;
    retval |= top_bit_func(n);
    MakeTable_outputUInt32(retval);
  };

  MakeTable_end();
}
Exemplo n.º 3
0
static void 
doTopBitTable(void) {
  int i;

  MakeTable_begin("topBitTable", 
                  TB_FILENAME, 
                  "uint32", 
                  StdDeck_N_RANKMASKS);
  MakeTable_comment(TB_COMMENT_STRING);
  for (i=0; i < StdDeck_N_RANKMASKS; i++) 
    MakeTable_outputUInt32(top_bit_func(i));

  MakeTable_end();
}
Exemplo n.º 4
0
static void 
doTripsValueTable(void) {
  int i;

  MakeTable_begin("evxTripsValueTable", 
                  TV_FILENAME, 
                  "uint32", 
                  StdDeck_N_RANKMASKS);
  MakeTable_comment(TV_COMMENT_STRING);
  for (i=0; i < StdDeck_N_RANKMASKS; i++) {
    uint32 val, cards;

    cards = i;
    val = top_bit_func(cards);
    cards ^= val;
    val |= top_bit_func(cards);
    if (val)
      val |= EvxHandVal_TRIPS;
    MakeTable_outputUInt32(val);
  };

  MakeTable_end();
}
Exemplo n.º 5
0
static void 
doTopFiveBitsTable(void) {
  int i;

  MakeTable_begin("topFiveBitsTable", 
                  T5B_FILENAME, 
                  "uint32", 
                  StdDeck_N_RANKMASKS);
  MakeTable_comment(T5B_COMMENT_STRING);
  for (i=0; i < StdDeck_N_RANKMASKS; i++) {
    uint32 retval, temp, n;

    n = i;
    temp = top_bit_func( n );  retval  = temp;  n &= ~temp;
    temp = top_bit_func( n );  retval |= temp;  n &= ~temp;
    temp = top_bit_func( n );  retval |= temp;  n &= ~temp;
    temp = top_bit_func( n );  retval |= temp;  n &= ~temp;
    temp = top_bit_func( n );  retval |= temp;

    MakeTable_outputUInt32(retval);
  };

  MakeTable_end();
}