I made a super simple design to start solving a problem.
Now, this might seem like super trivial at first, but since there are tons of ways to do this, it confuses me, due to my lack of professional experience.
Where would I define those compile time constants? (Always suppose I'm using the highest current C++ standard version)
In a namespace? Inside the class? In a .h outside the class? In the .cpp outside the class? Just use them as magic numbers and add some comment? static? non-static? const? constexpr? template the deck size in case its bigger?
What I thought of:
class JolloManager
{
private:
constexpr static int rounds = 3;
constexpr static int deckSize = 52;
constexpr static int princeId = 1;
constexpr static int princessId = 2;
std::array<int, deckSize> deck;
public:
JolloManager() {};
};
Is this correct?