X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d26c3f4ffb24d50457d405c9595fd23f9e5b7c..35b038b17edefee28f48440d26414d1df6b972e9:/demos/forty/card.h diff --git a/demos/forty/card.h b/demos/forty/card.h index b93ac93dd8..aab8df9d71 100644 --- a/demos/forty/card.h +++ b/demos/forty/card.h @@ -24,19 +24,24 @@ // Constants const int PackSize = 52; -const int CardWidth = 50; -const int CardHeight = 70; + +#define CardHeight Card::GetHeight() +#define CardWidth Card::GetWidth() // Data types enum Suit { clubs = 0, diamonds = 1, hearts = 2, spades = 3 }; enum SuitColour { red = 0, black = 1 }; enum WayUp { faceup, facedown }; - //--------------------------------// // A class defining a single card // //--------------------------------// class Card { + friend class FortyApp; + + static double m_scale; + static int m_width,m_height; + public: Card(int value, WayUp way_up = facedown); virtual ~Card(); @@ -50,6 +55,10 @@ public: int GetPipValue() const { return m_pipValue; } Suit GetSuit() const { return m_suit; } SuitColour GetColour() const { return m_colour; } + static void SetScale(double scale); + static int GetHeight() { return m_height; }; + static int GetWidth() { return m_width; }; + static double GetScale() { return m_scale; }; private: Suit m_suit;