From 1bca995878d651963f307d9af8265d60131db525 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 16 Jun 2022 22:12:44 +0200 Subject: [PATCH] Show infections in star topology --- network_attack_propagation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network_attack_propagation.py b/network_attack_propagation.py index ddad01c..d49d59f 100644 --- a/network_attack_propagation.py +++ b/network_attack_propagation.py @@ -188,7 +188,8 @@ def main(): do_graph_animation('ring.gif', ring, 20, nx.circular_layout) star, star_avg_rank = star_network() - do_graph_animation('star.gif', star, 5, nx.kamada_kawai_layout) + list(star.get_nodes())[1].is_infected = True + do_graph_animation('star.gif', star, 20, nx.kamada_kawai_layout) if __name__ == "__main__":