adds updateInvader function that checks if invader is killed