I don't know if this is Technically the right place to ask this but I need help designing a function, I need a Rubber Duck if you would.
I'm working on an Enemy class for my C++ RPG and I am in need of some suggestions.
The Base of my design as far as the Battle system and Character Objects and Enemies and such is that all have an ID. A simple int as it were that I associate with Character Names via enum ie.
enum class Character {PLAYER1 = 0, PLAYER2 = 1};
and enemies like so.
enum class Enemy {WOLF = 0, GHOST = 1, LICH = 2};
I have a random number generator and a map to my enemy enum in my mob class that does two things.
- selects an amount. // Self explanatory how many enemies there are.
- Selects a random ID from the map. // The type of Monster you'll face.
My Question is, how would I design a function that will construct an enemy based on it's ID?