Changed AI to use the next piece when considering the best move.