BAEL-1004 changes in variable names (#2238)

This commit is contained in:
Parth Karia 2017-07-09 15:53:21 +05:30 committed by maibin
parent e704d296bf
commit a219184b46

View File

@ -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);
}