Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. #ifndef _CARTA
  2. #define _CARTA
  3.  
  4. //#include <string>
  5.  
  6. const int N_CARTA = 13;
  7. const int N_PALS  = 4;
  8. const int CARTA_K = 13;
  9. const int NUM_MAX_CARTES = 52;
  10.  
  11. //const char strPal[]={'D','T','C','P'};
  12. const char strPal[]={4,5,3,6}; //Diamants,Trèvols,Cors,Piques
  13. const char strColor[]={'R','N'}; // Roig-Vermell, Negre
  14. const char strValor[]={'A','2','3','4','5','6','7','8','9','X','J','Q','K'};
  15.  
  16. #include <iostream>
  17. #include <iomanip>
  18. using namespace std;
  19.  
  20. class cCarta
  21. {
  22. private:
  23.     int valor;
  24.     int pal;
  25.     int color;
  26.     bool visible;  // permet mostrar la carta o no en la visualització
  27.  
  28. public:
  29.     cCarta();
  30.     ~cCarta();
  31.     void setCarta(int valor, int pal);
  32.     int getValor();
  33.     int getPal();
  34.     int getColor();
  35.     void mostra();
  36.     void setVisible();
  37. };
  38. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement