Skip to content

Commit a219184

Browse files
parthkariamaibin
authored andcommitted
BAEL-1004 changes in variable names (eugenp#2238)
1 parent e704d29 commit a219184

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • algorithms/src/main/java/com/baeldung/algorithms/minimax

‎algorithms/src/main/java/com/baeldung/algorithms/minimax/MiniMax.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public void constructTree(int noOfBones) {
1818
constructTree(root);
1919
}
2020

21-
private void constructTree(Node node) {
22-
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(node.getNoOfBones());
23-
boolean isMaxPlayer = !node.isMaxPlayer();
21+
private void constructTree(Node parentNode) {
22+
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(parentNode.getNoOfBones());
23+
boolean isChildMaxPlayer = !parentNode.isMaxPlayer();
2424
listofPossibleHeaps.forEach(n -> {
25-
Node newNode = new Node(n, isMaxPlayer);
26-
node.addChild(newNode);
25+
Node newNode = new Node(n, isChildMaxPlayer);
26+
parentNode.addChild(newNode);
2727
if (newNode.getNoOfBones() > 0) {
2828
constructTree(newNode);
2929
}

0 commit comments

Comments
 (0)