Formatting guide
Note the difference between using a function as a value, findAndAttackEnemy
, and actually calling the function, findAndAttackEnemy()
. The latter actually executes the code defined above in the function block.
Note the parenthesis.
You say your hero only removes half the health of the left enemy? Try modifying findAndAttackEnemy
to attack twice (or more, if necessary).