#pragma once #include #include #include #include #include "Deal.h" using namespace std; typedef unsigned char uchar; string cardName(int index, bool lowerCase); // given an index, return the card name. int Card2Index(char* name); // given a name, return the index. int readDeal(const char* fileName, uchar* hands); // read a pbn file void printDeal(uchar* hands); void printHands(uchar *hands); void randomDeal(uchar *hands); void nsIsBetter(uchar *hands); // Deal "random" hand with N-S having the most points int handPoints(uchar *hands, int player); // return the # of high card points in a hand static const char cardSuit[] = { 'C', 'D', 'H','S', 0 }; // suits, from low to high // card values, low to high static const char cardValue[] = { 'A','2','3','4','5','6','7','8','9','T','J','Q','K',0 }; // The order in which we print the cards according to their value static const char printOrder[] = { 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; static const char cardPoints[] = { 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 }; static const char isBlack[] = { 1,0,0,1,0 }; // is the suit black? If it ain't its red. static const char handName[] = { 'N', 'E', 'S','W'};