Skip to content
Snippets Groups Projects
Commit 29e557f9 authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Move FloodingNode so code is alphabetical

parent 01bf7090
No related branches found
No related tags found
2 merge requests!3Version 0.2,!1Full rewrite
......@@ -405,19 +405,6 @@ class Node:
)
class FloodingNode(Node):
"""Node which forwards through flooding."""
def forward(self, packet):
"""Forward to all neighbour nodes."""
forward = {
neighbour: 'flood'
for neighbour in self.neighbours
}
return forward
class EpidemicNode(Node):
"""Node which forwards epidemically."""
......@@ -462,6 +449,19 @@ class EpidemicNode(Node):
del self.__sent[packet]
class FloodingNode(Node):
"""Node which forwards through flooding."""
def forward(self, packet):
"""Forward to all neighbour nodes."""
forward = {
neighbour: 'flood'
for neighbour in self.neighbours
}
return forward
Contact = namedtuple('Contact', ['time', 'a', 'b', 'join'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment