mardi 19 mars 2019

How to design a class that will be used to create many instances for program?

Let's say you have a game similar to the popular Pokemon game. So you have a Pokemon class which all the pokemons in the game derive from. Just like in the actual pokemon game you know all the pokemons you want in the game with their skills and attributes (lets assume these pokemons will always have the same skills attributes level etc.) How should you go about designing this? Should you write a method that creates these custom pokemons in the Pokemon Class and then use them when needed? Sorry if this was confusing but this was the best analogy I can think of.

Aucun commentaire:

Enregistrer un commentaire