minor changes for game end logic.
final end of game logic