This commit is contained in:
deadsmond 2019-11-25 20:11:08 +01:00
parent bd7b567b62
commit c394833efe

View File

@ -60,12 +60,9 @@ class automata:
if self.graph[q]: if self.graph[q]:
# search through all its connections to find value # search through all its connections to find value
for transition in self.graph[q]: for transition in self.graph[q]:
print(transition) if transition[i]:
# if value is like searched for # append next node
for key in transition: result.append(transition[i])
if key == i:
# append next node
result.append(transition[key])
# return list of next nodes # return list of next nodes
return result return result