Server IP : 162.0.232.140 / Your IP : 3.139.85.113 Web Server : LiteSpeed System : Linux premium139.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : micrcvoy ( 740) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /lib64/python3.8/turtledemo/__pycache__/ |
Upload File : |
U e5d � @ sd d Z ddlT G dd� de�ZG dd� de�Zdd� Zd d � Zdd� Ze d kr`e� Z ee � e� dS )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 Zd Zdd� ZdS )�Discc C sP t j| ddd� | �� | �d|d d� | �|d dd|d � | �� d S ) NZsquareF)�shapeZvisibleg �?� g @r � )�Turtle�__init__ZpuZ shapesizeZ fillcolor�st)�self�n� r �0/usr/lib64/python3.8/turtledemo/minimal_hanoi.pyr s z Disc.__init__N)�__name__� __module__�__qualname__r r r r r r s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �Towerz-Hanoi tower, a subclass of built-in type listc C s || _ dS )z-create an empty tower. x is x-position of pegN)�x)r r r r r r s zTower.__init__c C s0 |� | j� |�ddt| � � | �|� d S )Nij����"