Currently, to match Pokemon type, we are using a function and branching it with if else statements. Instead of branching, I think we can use a constant with an idea of utilising it as a hashmap. Much lesser cognitive complexity and easier to maintain :).
Please let me know if you find this ok. I can do a small tweak with the code. Thanks!
Hi @Juggernaut9
Currently, to match Pokemon type, we are using a function and branching it with
if else
statements. Instead of branching, I think we can use a constant with an idea of utilising it as a hashmap. Much lesser cognitive complexity and easier to maintain :).Please let me know if you find this ok. I can do a small tweak with the code. Thanks!