Renamed a few variables so they make sense. Added an energy system for the player, including a method to restore energy.
Removed magic numbers.