From b33d152301c4c334a51899e5c4d6b2a0cfd2f014 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 13 Jun 2016 15:21:58 +0200 Subject: Addresses changed (should be configurable...) --- src/main/java/org/openslx/graph/Edge.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/openslx/graph/Edge.java') diff --git a/src/main/java/org/openslx/graph/Edge.java b/src/main/java/org/openslx/graph/Edge.java index 9d03aeb..c896651 100644 --- a/src/main/java/org/openslx/graph/Edge.java +++ b/src/main/java/org/openslx/graph/Edge.java @@ -51,6 +51,7 @@ public class Edge implements java.io.Serializable _health--; } _age++; + _weight = 0; } public boolean isAlive() @@ -58,9 +59,9 @@ public class Edge implements java.io.Serializable return _health > 0; } - public void setWeight( double weight ) + public void addWeight( double weight ) { - _weight = weight; + _weight += weight; _health = _maxHealth; } -- cgit v1.2.3-55-g7522