improved minimax algorithm; threw out second heuristic function