Explorar o código

i hate everything. giving up is life

tarfeef101 %!s(int64=6) %!d(string=hai) anos
pai
achega
8ab6e79eb4
Modificáronse 1 ficheiros con 3 adicións e 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