Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Towers:
- def __init__(self):
- self.n = 5
- self.current = 1
- self.hasItMoved = [0,0,0,0,0,0,0,0,0,0,0,0]
- self.toDest = [1,1,1,1,1,1,1,1,1,1,1,1]
- self.r = self.n
- self.hanoiStart(self.n, "Start", "Aux1", "Aux3", "Aux2", "Dest", self.current)
- def hanoiStart(self, numOfDisks, start, source, dest, aux, last, current):
- self.move(1, start, source, self.current)
- self.current = self.current + 1
- self.H1(self.n, "Start", "Aux1", "Aux3", "Aux2", "Dest", self.current)
- self.move(1, dest, last, self.current)
- self.current = self.current + 1
- pass
- def H1(self, numOfDisks, start, source, dest, aux, last, current):
- pass
- def move(self, aDisk, source, dest, currentStep):
- print('Move {}: Move Disk {} from {} to {}'.format(self.current, aDisk, source, dest))
- print("Welcome to Towers of Leiss")
- towerTest = Towers()
Add Comment
Please, Sign In to add comment