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);
|
||||
}
|
||||
|
||||
private void constructTree(Node node) {
|
||||
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(node.getNoOfBones());
|
||||
boolean isMaxPlayer = !node.isMaxPlayer();
|
||||
private void constructTree(Node parentNode) {
|
||||
List<Integer> listofPossibleHeaps = GameOfBones.getPossibleStates(parentNode.getNoOfBones());
|
||||
boolean isChildMaxPlayer = !parentNode.isMaxPlayer();
|
||||
listofPossibleHeaps.forEach(n -> {
|
||||
Node newNode = new Node(n, isMaxPlayer);
|
||||
node.addChild(newNode);
|
||||
Node newNode = new Node(n, isChildMaxPlayer);
|
||||
parentNode.addChild(newNode);
|
||||
if (newNode.getNoOfBones() > 0) {
|
||||
constructTree(newNode);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user