public Node(int value, bool question, DTenemy enemy, State behaviour) { this.enemy = enemy; this.value = value; this.question = question; this.behaviour = behaviour; }
public DTController(DTenemy e, Orb o, Tree tree, ChaseState cS, GuardState gS, ScoreState sS, Goal pG, Goal eG) { this.e = e; this.tree = tree; this.cS = cS; this.gS = gS; this.sS = sS; this.o = o; currentState = new State(e, o, pG, eG); MakeDtree(); }
public Node Insert(int value, bool question, DTenemy enemy, State behaviour) { Node node = new Node(value, question, enemy, behaviour); try { if (root == null) { root = node; } else { Add(node, ref root); } return(node); } catch (Exception) { return(null); } }
public void TreeUpdate(DTenemy enemy) { Node currentNode = root; while (currentNode != null) { if (currentNode.question == false && currentNode.left != null) { currentNode = currentNode.left; if (currentNode.behaviour != null) { } } else if (currentNode.question == true && currentNode.right != null) { currentNode = currentNode.right; if (currentNode.behaviour != null) { } } } }
public State(DTenemy enemy, Orb o, Goal pGoal, Goal eGoal) { this.enemy = enemy; this.pGoal = pGoal; this.eGoal = eGoal; }
public Tree(DTenemy enemy) { this.enemy = enemy; }