public override Boolean validate(CircleNode newnode, CircleNode oldnode, InfoDomain domain, Graph graph) { State newstate = newnode.getState(); State oldstate = oldnode.getState(); if (outsideOfMap(newstate)) { return(false); } else { if (isVerticalMovement(oldstate, newstate) || newstate.getAction() == 2) { if (thereIsWallBetweenV(newstate, oldstate, domain)) { return(false); } else { return(true); } } else { if (thereIsWallBetweenH(newstate, oldstate, domain)) { return(false); } else { return(true); } } } }
private Path recursiveTraceBack(CircleNode goalNode, Path l) { if (goalNode.getParent() == null) { l.AddNewPoint(goalNode.getState().point); return(l); } else { this.recursiveTraceBack(goalNode.getParent(), l); l.AddNewPoint(goalNode.getState().point); if (goalNode.getParent().getParent() != null) { if (goalNode.getParent().getState().getVelocityX() != goalNode.getState().getVelocityX() && goalNode.getParent().getState().getPosY() >= goalNode.getState().getPosY()) { goalNode.getParent().getState().point.TurningPoint = true; } } return(l); } }