Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
12 kB
1
Indexable
Never
void printTop(std::string hand[], int numberOfCards){
    for (int i = 0; i < numberOfCards; i++){
        std::cout << WHITE_BG << "          " << RESET << " ";
        if (i < numberOfCards - 1) {
           std::cout << " ";
        }
    }
    std::cout << std::endl;
}

void printTopNumberSlot(std::string hand[], int numberOfCards){
    for (int i = 0; i < numberOfCards; i++){
        
        if (hand[i] == "AH" || hand[i] == "AD"){
            std::cout << RED_CARD << "  A       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "2H" || hand[i] == "2D"){
            std::cout << RED_CARD << "  2       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "3H" || hand[i] == "3D"){
            std::cout << RED_CARD << "  3       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "4H" || hand[i] == "4D"){
            std::cout << RED_CARD << "  4       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "5H" || hand[i] == "5D"){
            std::cout << RED_CARD << "  5       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "6H" || hand[i] == "6D"){
            std::cout << RED_CARD << "  6       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "7H" || hand[i] == "7D"){
            std::cout << RED_CARD << "  7       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "8H" || hand[i] == "8D"){
            std::cout << RED_CARD << "  8       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "9H" || hand[i] == "9D"){
            std::cout << RED_CARD << "  9       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "10H" || hand[i] == "10D"){
            std::cout << RED_CARD << " 10       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "JH" || hand[i] == "JD"){
            std::cout << RED_CARD << "  J       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "QH" || hand[i] == "QD"){
            std::cout << RED_CARD << "  Q       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "KH" || hand[i] == "KD"){
            std::cout << RED_CARD << "  K       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AC" || hand[i] == "AS"){
            std::cout << BLACK_CARD << "  A       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "2C" || hand[i] == "2S"){
            std::cout << BLACK_CARD << "  2       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "3C" || hand[i] == "3S"){
            std::cout << BLACK_CARD << "  3       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "4C" || hand[i] == "4S"){
            std::cout << BLACK_CARD << "  4       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "5C" || hand[i] == "5S"){
            std::cout << BLACK_CARD << "  5       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "6C" || hand[i] == "6S"){
            std::cout << BLACK_CARD << "  6       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "7C" || hand[i] == "7S"){
            std::cout << BLACK_CARD << "  7       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "8C" || hand[i] == "8S"){
            std::cout << BLACK_CARD << "  8       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "9C" || hand[i] == "9S"){
            std::cout << BLACK_CARD << "  9       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "10C" || hand[i] == "10S"){
            std::cout << BLACK_CARD << " 10       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "JC" || hand[i] == "JS"){
            std::cout << BLACK_CARD << "  J       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "QC" || hand[i] == "QS"){
            std::cout << BLACK_CARD << "  Q       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "KC" || hand[i] == "KS"){
            std::cout << BLACK_CARD << "  K       " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        }
        
    }
    std::cout << std::endl;
}

void printTopOfSuit(std::string hand[], int numberOfCards){
    for (int i = 0; i < numberOfCards; i++){

        if (hand[i] == "AH" || hand[i] == "2H" || hand[i] == "3H" || hand[i] == "4H" || hand[i] == "5H" || hand[i] == "6H" || hand[i] == "7H" || hand[i] == "8H" || hand[i] == "9H" || hand[i] == "10H" || hand[i] == "JH" || hand[i] == "KH" || hand[i] == "QH"){
            std::cout << RED_CARD << "   _  _   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AD" || hand[i] == "2D" || hand[i] == "3D" || hand[i] == "4D" || hand[i] == "5D" || hand[i] == "6D" || hand[i] == "7D" || hand[i] == "8D" || hand[i] == "9D" || hand[i] == "10D" || hand[i] == "JD" || hand[i] == "KD" || hand[i] == "QD"){
            std::cout << RED_CARD << "    /\\    " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AC" || hand[i] == "2C" || hand[i] == "3C" || hand[i] == "4C" || hand[i] == "5C" || hand[i] == "6C" || hand[i] == "7C" || hand[i] == "8C" || hand[i] == "9C" || hand[i] == "10C" || hand[i] == "JC" || hand[i] == "KC" || hand[i] == "QC"){
            std::cout << BLACK_CARD << "    __    " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AS" || hand[i] == "2S" || hand[i] == "3S" || hand[i] == "4S" || hand[i] == "5S" || hand[i] == "6S" || hand[i] == "7S" || hand[i] == "8S" || hand[i] == "9S" || hand[i] == "10S" || hand[i] == "JS" || hand[i] == "KS" || hand[i] == "QS"){
            std::cout << BLACK_CARD << "    /\\    " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } 

        
    }
    std::cout << std::endl;
}

void printMiddleOfSuit1(std::string hand[], int numberOfCards){
    for (int i = 0; i < numberOfCards; i++){

        if (hand[i] == "AH" || hand[i] == "2H" || hand[i] == "3H" || hand[i] == "4H" || hand[i] == "5H" || hand[i] == "6H" || hand[i] == "7H" || hand[i] == "8H" || hand[i] == "9H" || hand[i] == "10H" || hand[i] == "JH" || hand[i] == "KH" || hand[i] == "QH"){
            std::cout << RED_CARD << "  ( \\/ )  " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AD" || hand[i] == "2D" || hand[i] == "3D" || hand[i] == "4D" || hand[i] == "5D" || hand[i] == "6D" || hand[i] == "7D" || hand[i] == "8D" || hand[i] == "9D" || hand[i] == "10D" || hand[i] == "JD" || hand[i] == "KD" || hand[i] == "QD"){
            std::cout << RED_CARD << "   /  \\   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AC" || hand[i] == "2C" || hand[i] == "3C" || hand[i] == "4C" || hand[i] == "5C" || hand[i] == "6C" || hand[i] == "7C" || hand[i] == "8C" || hand[i] == "9C" || hand[i] == "10C" || hand[i] == "JC" || hand[i] == "KC" || hand[i] == "QC"){
            std::cout << BLACK_CARD << "   (  )   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AS" || hand[i] == "2S" || hand[i] == "3S" || hand[i] == "4S" || hand[i] == "5S" || hand[i] == "6S" || hand[i] == "7S" || hand[i] == "8S" || hand[i] == "9S" || hand[i] == "10S" || hand[i] == "JS" || hand[i] == "KS" || hand[i] == "QS"){
            std::cout << BLACK_CARD << "   /  \\   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } 

        
    }
    std::cout << std::endl;
}

void printMiddleOfSuit2(std::string hand[], int numberOfCards){
    for (int i = 0; i < numberOfCards; i++){

        if (hand[i] == "AH" || hand[i] == "2H" || hand[i] == "3H" || hand[i] == "4H" || hand[i] == "5H" || hand[i] == "6H" || hand[i] == "7H" || hand[i] == "8H" || hand[i] == "9H" || hand[i] == "10H" || hand[i] == "JH" || hand[i] == "KH" || hand[i] == "QH"){
            std::cout << RED_CARD << "   \\  /   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AD" || hand[i] == "2D" || hand[i] == "3D" || hand[i] == "4D" || hand[i] == "5D" || hand[i] == "6D" || hand[i] == "7D" || hand[i] == "8D" || hand[i] == "9D" || hand[i] == "10D" || hand[i] == "JD" || hand[i] == "KD" || hand[i] == "QD"){
            std::cout << RED_CARD << "   \\  /   " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AC" || hand[i] == "2C" || hand[i] == "3C" || hand[i] == "4C" || hand[i] == "5C" || hand[i] == "6C" || hand[i] == "7C" || hand[i] == "8C" || hand[i] == "9C" || hand[i] == "10C" || hand[i] == "JC" || hand[i] == "KC" || hand[i] == "QC"){
            std::cout << BLACK_CARD << "  (____)  " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } else if (hand[i] == "AS" || hand[i] == "2S" || hand[i] == "3S" || hand[i] == "4S" || hand[i] == "5S" || hand[i] == "6S" || hand[i] == "7S" || hand[i] == "8S" || hand[i] == "9S" || hand[i] == "10S" || hand[i] == "JS" || hand[i] == "KS" || hand[i] == "QS"){
            std::cout << BLACK_CARD << "  (____)  " << RESET << " ";
            if (i < numberOfCards - 1) {
                std::cout << " ";
            }
        } 

        
    }
    std::cout << std::endl;
}
Leave a Comment