BAEL-1004 changes in variable names (#2238)
This commit is contained in:
parent
e704d296bf
commit
a219184b46
@ -18,12 +18,12 @@ public class MiniMax {
|
|||||||
constructTree(root);
|
constructTree(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void constructTree(Node node) {
|
private void constructTree(Node parentNode) {
|
||||||
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(node.getNoOfBones());
|
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(parentNode.getNoOfBones());
|
||||||
boolean isMaxPlayer = !node.isMaxPlayer();
|
boolean isChildMaxPlayer = !parentNode.isMaxPlayer();
|
||||||
listofPossibleHeaps.forEach(n -> {
|
listofPossibleHeaps.forEach(n -> {
|
||||||
Node newNode = new Node(n, isMaxPlayer);
|
Node newNode = new Node(n, isChildMaxPlayer);
|
||||||
node.addChild(newNode);
|
parentNode.addChild(newNode);
|
||||||
if (newNode.getNoOfBones() > 0) {
|
if (newNode.getNoOfBones() > 0) {
|
||||||
constructTree(newNode);
|
constructTree(newNode);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user