Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
11 kB
2
Indexable
Never
void bottom(std::string hand[], int amountOfCards){
    for(int i = 0; i < amountOfCards; i++){
        if (hand[i]== "AC" || hand[i] == "AS"){
        std::cout << BLACK_CARD << "       A  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "2C" || hand[i] == "2S"){
        std::cout << BLACK_CARD << "       2  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "3C" || hand[i] == "3S"){
            std::cout << BLACK_CARD << "       3  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "4C" || hand[i] == "4S"){
            std::cout << BLACK_CARD << "       4  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "5C" || hand[i] == "5S"){
            std::cout << BLACK_CARD << "       5  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "6C" || hand[i] == "6S"){
            std::cout << BLACK_CARD << "       6  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "7C" || hand[i] == "7S"){
            std::cout << BLACK_CARD << "       7  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "8C" || hand[i] == "8S"){
            std::cout << BLACK_CARD << "       8  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "9C" || hand[i] == "9S"){
            std::cout << BLACK_CARD << "       9  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "10C" || hand[i] == "10S"){
            std::cout << BLACK_CARD << "       10 " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "JC" || hand[i] == "JS"){
            std::cout << BLACK_CARD << "       J  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "QC" || hand[i] == "QS"){
            std::cout << BLACK_CARD << "       Q  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "KC" || hand[i] == "KS"){
            std::cout << BLACK_CARD << "       K  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if (hand[i]== "AH" || hand[i] == "AD"){
        std::cout << RED_CARD << "       A  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "2H" || hand[i] == "2D"){
            std::cout << RED_CARD << "       2  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "3H" || hand[i] == "3D"){
            std::cout << RED_CARD << "       3  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "4H" || hand[i] == "4D"){
            std::cout << RED_CARD << "       4  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "5H" || hand[i] == "5D"){
            std::cout << RED_CARD << "       5  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "6H" || hand[i] == "6D"){
            std::cout << RED_CARD << "       6  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "7H" || hand[i] == "7D"){
            std::cout << RED_CARD << "       7  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "8H" || hand[i] == "8D"){
        std::cout << RED_CARD << "       8  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "9H" || hand[i] == "9D"){
            std::cout << RED_CARD << "       9  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "10H" || hand[i] == "10D"){
            std::cout << RED_CARD << "       10 " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "JH" || hand[i] == "JD"){
            std::cout << RED_CARD << "       J  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "QH" || hand[i] == "QD"){
            std::cout << RED_CARD << "       Q  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }else if(hand[i]== "KH" || hand[i] == "KD"){
            std::cout << RED_CARD << "       K  " << RESET << " ";
            if (i < amountOfCards - 1){
                std::cout << " ";
            }
        }
    }
    std::cout << std::endl;
}   


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

        }       
        
    }
    std::cout << std::endl;
} 
void printBottom(std::string hand[], int amountOfCards){
    for (int i = 0; i < amountOfCards; i++){
    std::cout << WHITE_BG << "          " << RESET << " ";
    if (i < amountOfCards - 1){
        std::cout << " ";
    }
    }
}
Leave a Comment