D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
python35
/
lib
/
python3.5
/
turtledemo
/
__pycache__
/
Filename :
minimal_hanoi.cpython-35.opt-1.pyc
back
Copy
q��Y � @ s� d Z d d l TGd d � d e � Z Gd d � d e � Z d d � Z d d � Z d d � Z e d k r� e � Z e e � e � d S)a� turtle-example-suite: tdemo_minimal_hanoi.py A minimal 'Towers of Hanoi' animation: A tower of 6 discs is transferred from the left to the right peg. An imho quite elegant and concise implementation using a tower class, which is derived from the built-in type list. Discs are turtles with shape "square", but stretched to rectangles by shapesize() --------------------------------------- To exit press STOP button --------------------------------------- � )�*c @ s e Z d Z d d � Z d S)�Discc C sg t j | d d d d �| j � | j d | d d � | j | d d d | d � | j � d S) N�shapeZsquareZvisibleFg �?� g @r � )�Turtle�__init__ZpuZ shapesizeZ fillcolor�st)�self�n� r �,/opt/python35/lib/python3.5/minimal_hanoi.pyr s z Disc.__init__N)�__name__� __module__�__qualname__r r r r r r s r c @ s: e Z d Z d Z d d � Z d d � Z d d � Z d S) �Towerz-Hanoi tower, a subclass of built-in type listc C s | | _ d S)z-create an empty tower. x is x-position of pegN)�x)r r r r r r s zTower.__init__c C s<