made the enemy update partitioned into functions so it is more universal and usable