Original Post
Hello
I have some troubles with structure of my game. I want to have about 30 types of buildings, so I wrote virtual class building, and for each type of building one derived class. I have all my buildings in one array called building_list. Problem is that every type of building has different functions. So it will be about 90 functions probably. I dont think, that its a good idea to have 90 virtual functions in base class building, but I dont know how can I avoid it. And I want to have all buildings in one array. Is it possible to do it somehow?
Thanks for answers.
I have some troubles with structure of my game. I want to have about 30 types of buildings, so I wrote virtual class building, and for each type of building one derived class. I have all my buildings in one array called building_list. Problem is that every type of building has different functions. So it will be about 90 functions probably. I dont think, that its a good idea to have 90 virtual functions in base class building, but I dont know how can I avoid it. And I want to have all buildings in one array. Is it possible to do it somehow?
Thanks for answers.