recognizes when game is over