Advertisement
Guest User

Untitled

a guest
Nov 30th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. #include <cstdlib>
  2. #include "card.h"
  3. #include "Pile.h"
  4. #include "Deck.h"
  5. #include <ctime>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     srand(time(NULL));
  12.    
  13.     Card a(4, 'h');
  14.     Card b(1, 'd');
  15.     Card c(9, 's');
  16.     Card d(12, 'C');
  17.     Card e(13, 's');
  18.     Card f(a);
  19.     Card g(4, 'c');
  20.    
  21.     cout << c << endl;
  22.     c.setCard(5, 'd');
  23.     cout << c << endl;
  24.     cout << d << endl;
  25.     cout << a.getRank() << endl;
  26.     cout << b.getRank() << endl;
  27.    
  28.     cout << (a == b) << endl;
  29.     cout << (a == g) << endl;
  30.     cout << (b > a) << endl;
  31.     cout << (a > b) << endl;
  32.    
  33.     Pile myPile;
  34.     myPile = myPile + a;
  35.     myPile = myPile + b;
  36.     myPile = myPile + c;
  37.     myPile = myPile + d;
  38.     myPile = myPile + e;
  39.     myPile = myPile + f;
  40.     myPile = myPile + g;
  41.    
  42.     cout << "--------------" << endl;
  43.     cout << myPile.getCount() << endl;
  44.     cout << myPile << endl;
  45.    
  46.    
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement