private int getNeighborNum(PersonNode node) { int sum = 0; PlaceNode[,] nodes = FloorPlanManager.getInstance().getNodes(); List <Point> neighborPoints = GlobalController.getInstance().findNeighborsWithoutBlock(node.getPosition(), 3); foreach (Point point in neighborPoints) { sum += nodes[point.x, point.y].getPersonNum(); } return(sum); }
private void increaseNeighborScareValue(PersonNode personNode) { List <Point> neighborPoints = GlobalController.getInstance().findNeighborsWithoutBlock(personNode.getPosition(), 3); foreach (PersonNode node in personList) { if (neighborPoints.Contains(node.getPosition())) { node.increaseScareValue(); } } }