Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class directionEntry():
- def __init__(self,step_number,previous_Step,next_step):
- self.step_number = step_number
- self.previous_step = previous_Step
- self.next_step = next_step
- def getNext(self):
- return self.next_step
- directionStepEntry10100297332 = directionEntry(1,None,2)
- directionStepEntry10100297342 = directionEntry(2,1,3)
- directionStepEntry10100297372 = directionEntry(3,2,4)
- directionStepEntry10100297432 = directionEntry(4,3,None)
- series_of_steps =[directionStepEntry10100297332,directionStepEntry10100297342,directionStepEntry10100297372,directionStepEntry10100297432]
- next_step = series_of_steps[0].next_step
- direction_entry_index = 0
- while direction_entry_index < len(series_of_steps)-1:
- if next_step != None:
- print("The next step is step number:",series_of_steps[direction_entry_index].next_step)
- next_step = series_of_steps[direction_entry_index].next_step
- direction_entry_index += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement