예제 #1
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public Node(Node n)
     : base(n.z)
 {
     this.rect = n.rect;
     this.weight = n.z;
     this.parent = null;
     this.children = null;
     this.color = n.color;
 }
예제 #2
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public Node(Color color, int x, int y, int z)
     : base(z)
 {
     this.rect = new Rectangle();
     rect.X = x;
     rect.Y = y;
     rect.Width = 1;
     rect.Height = 1;
     this.weight = 1;
     this.parent = null;
     this.color = color;
 }
예제 #3
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public void removeNeighbor(Node node)
 {
     this.neighbors.Remove(this.neighbors.Find(o => o.neighbor == node));
 }
예제 #4
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public bool hasNeighbor(Node node)
 {
     return this.neighbors.Find(o => o.neighbor == node) != null;
 }
예제 #5
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public Connection getNeighbor(Node node)
 {
     return this.neighbors.Find(o => o.neighbor == node);
 }
예제 #6
0
파일: Node.cs 프로젝트: Cizall/Tibialyzer
 public void addNeighbor(Node node, SpecialConnection settings = null, bool possibleDuplicate = false)
 {
     if (!possibleDuplicate && this.neighbors.Find(o => o.neighbor == node) != null) {
         throw new Exception("");
     }
     this.neighbors.Add(new Connection(node, settings));
 }