jeudi 23 janvier 2020

Testing rules for lots of combinations

I need an advice on a system design for a game. There are heroes and there are bonuses. Bonuses can be applied to the heroes. There are also rules like: If bonus B applied to hero H, then .... There are no rules for each and every combination hero-bonus, let's assume there is 50% of such combinations covered. If no rule specified, nothing happens.

Assuming there are 100 bonuses and 100 heroes, what is the best approach to design such system? I believe having each relation test gives much flexibility, but it is not the best from code readability and maintenance perspective. Also, if I am going to add either hero, or bonus, it will become a huge piece of refactoring.

Any ideas?

Aucun commentaire:

Enregistrer un commentaire