Implemented end game logic when character traverses total path height.