Added an attack algorithm for the enemy.