In our current targeting strategies, the type field is a string in some cases and a map in others. It would be better to have type as a string and a separate stat field for the cases in which corresponds (highest and lowest targeting strategies, for instance).
This refactor will help to simplify the implementation of create_mechanics_map/3, where we're currently implementing different behaviors for the string and the map case.
Also, talk with Game Design in order to make this change in the design documents.
🚧 Refactor
Check the first and last comment left in: https://github.com/lambdaclass/mirra_backend/pull/647
In our current targeting strategies, the type field is a string in some cases and a map in others. It would be better to have type as a string and a separate stat field for the cases in which corresponds (highest and lowest targeting strategies, for instance).
This refactor will help to simplify the implementation of
create_mechanics_map/3
, where we're currently implementing different behaviors for the string and the map case.Also, talk with Game Design in order to make this change in the design documents.