Fixes the minimax tree to find end states

checks to see if in tree construction the game has endded.