private void recMinMax(Node currentNode, int player, int depth) {
        // depth_lpnode = depth of (l)ast (p)arent node

        if (currentNode.empty) {
            return;
        }

        // until last node with children (max_depth -1 means depth_lpnode = last parent node)
//        if (currentNode.nodeDepth != depth_lastParentNode) {
//            for (int i = 0; i < currentNode.children.size(); i++) {
//                recMinMax(currentNode.children.get(i), depth_lastParentNode, player);
//            }
//        }

        if (!currentNode.children.isEmpty()) {
            for (int i = 0; i < currentNode.children.size(); i++) {
                Node n;
                if (!(n = currentNode.children.get(i)).children.isEmpty()) {
                    recMinMax(n, player, depth + 1);
                }
            }

            // now we are in right depth. currentNode has 7 children

            int minOrMax = depth % 2;
            try {
                if (minOrMax == 1) {
                    // odd depth value --> maximize
//                    currentNode.value = max(currentNode.children);
                    max(currentNode);
                } else {
                    // even depth value --> minimize
//                    currentNode.value = min(currentNode.children);
                    min(currentNode);
                }
            } catch (AllNodesEmptyException ex) {
                currentNode.empty = true;
            }
        }
    }