# -*- coding: utf-8 -*-
# Time : 2019/4/5 22:35
# Author : Mifen
# Email : 2952277346@qq.com
# Github : https://github.com/Amd794
import turtle
class Stack:
def __init__(self):
self.items = []
def isEmpty(self):
return len(self.items) == 0
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
if not self.isEmpty():
return self.items[len(self.items) - 1]
def size(self):
return len(self.items)
def drawpole_3(): # 画出汉诺塔的poles
t = turtle.Turtle()
t.hideturtle()
def drawpole_1(k):
t.up()
t.pensize(10)
t.speed(100)
t.goto(400 * (k - 1), 100)
t.down()
t.goto(400 * (k - 1), -100)
t.goto(400 * (k - 1) - 20, -100)
t.goto(