Convert Entity stats to a Hash
nskins opened this issue · comments
Each of the Entity
stats (hp
, max_hp
, attack
, defense
, agility
) should be contained within a single Hash called stats
. Then we can reference the particular stat as the key (e.g. stats[:hp]
) to retrieve it. This will be useful in #alter_stats
of the Equippable
module. The current implementation of this function references each stat individually (ugly). Instead, we can loop through all the keys in stats
and update them as appropriate.
Also, update the tests in #alter_stats
to include some cases of modifying hp
and max_hp
.
Pull requests can be sent to the entity-stats
branch.
Hey just found this project and would like to contribute. Mind if I pick this one up?