Guest User

Untitled

a guest
Feb 23rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. class Towers:
  2. def __init__(self):
  3. self.n = 5
  4. self.current = 1
  5. self.hasItMoved = [0,0,0,0,0,0,0,0,0,0,0,0]
  6. self.toDest = [1,1,1,1,1,1,1,1,1,1,1,1]
  7. self.r = self.n
  8. self.hanoiStart(self.n, "Start", "Aux1", "Aux3", "Aux2", "Dest", self.current)
  9.  
  10. def hanoiStart(self, numOfDisks, start, source, dest, aux, last, current):
  11. self.move(1, start, source, self.current)
  12. self.current = self.current + 1
  13. self.H1(self.n, "Start", "Aux1", "Aux3", "Aux2", "Dest", self.current)
  14. self.move(1, dest, last, self.current)
  15. self.current = self.current + 1
  16. pass
  17.  
  18. def H1(self, numOfDisks, start, source, dest, aux, last, current):
  19. pass
  20.  
  21. def move(self, aDisk, source, dest, currentStep):
  22. print('Move {}: Move Disk {} from {} to {}'.format(self.current, aDisk, source, dest))
  23.  
  24. print("Welcome to Towers of Leiss")
  25. towerTest = Towers()
Add Comment
Please, Sign In to add comment