Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstdlib>
- #include "Card.h"
- #include "Deck.h"
- int main(int argc, char *argv[])
- {
- std::vector<Card> hand;
- Deck fulldeck;
- int i, j, k;
- /* create an array of card pointers */
- // Cards** hand = new Cards*[5];
- /* make a card for each one */
- for(i=0;i<5;i++)
- hand.push_back(Card(i%4, (i*17)%14));
- /* print out the cards in the hand */
- printf("Hand: ");
- for(i=0;i<5;i++)
- hand[i].print_card(stdout);
- printf("\n");
- /* make a standard deck of cards */
- /* print out all of the cards */
- for(i=0;i<fulldeck.get_num_cards();)
- for(j=0;j<13 && i<fulldeck.get_num_cards();j++,i++)
- fulldeck.get_card(i).print_card(stdout);
- /* compare some cards */
- printf("Compare: ");
- fulldeck.get_card(5)->print_card(stdout);
- fulldeck.get_card(17)->print_card(stdout);
- printf(": %d\n",fulldeck.getcard(5).compare(fulldeck.get_card(17)));
- printf("find index: C 5: %d", fulldeck.find_index(0,5));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement