added check for endgame, need to predict near end game state