check if game is over
game when it is over