Moved the logic that checks if you are dead to its own method.