Explorar el Código

i hate everything. giving up is life

tarfeef101 hace 6 años
padre
commit
8ab6e79eb4
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      a3/router.py

+ 3 - 0
a3/router.py

@@ -152,6 +152,9 @@ class graph:
         while(sum(unvisited)):
             # iterate on routers adjacent to curnode
             for i in range(0, 5):
+                # skip for curnode = rid - 1
+                if (curnode == (rid - 1)):
+                    break
                 # don't check curnode
                 if (i == curnode):
                     continue