X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d26c3f4ffb24d50457d405c9595fd23f9e5b7c..c3016fd626994c6f9f555e03076a497eb1f5797c:/demos/forty/card.h diff --git a/demos/forty/card.h b/demos/forty/card.h index b93ac93dd8..cc525a741b 100644 --- a/demos/forty/card.h +++ b/demos/forty/card.h @@ -24,8 +24,9 @@ // 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 }; @@ -37,6 +38,9 @@ enum WayUp { faceup, facedown }; // A class defining a single card // //--------------------------------// class Card { + static double m_scale; + static int m_width,m_height; + public: Card(int value, WayUp way_up = facedown); virtual ~Card(); @@ -50,6 +54,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;