/
proc
/
2470164
/
root
/
usr
/
lib64
/
python3.6
/
turtledemo
/
__pycache__
/
File Upload :
llllll
Current File: //proc/2470164/root/usr/lib64/python3.6/turtledemo/__pycache__/bytedesign.cpython-36.pyc
3 \� � @ sX d Z ddlmZmZ ddlmZ G dd� de�Zdd� ZedkrTe� Z e e � e� d S ) a� turtle-example-suite: tdemo_bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. It's based on an article in BYTE magazine Problem Solving with Logo: Using Turtle Graphics to Redraw a Design November 1982, p. 118 - 134 ------------------------------------------- Due to the statement t.delay(0) in line 152, which sets the animation delay to 0, this animation runs in "line per line" mode as fast as possible. � )�Turtle�mainloop)�clockc @ sT e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� ZdS )�Designerc C s� | j � xVtd�D ]J}| jd| � | j� | j| j� |� | j � | jd| � | jd� qW | j � | j|� | jd� | jd| � | jd� | j� | j d| d|� | j � jd � d S ) N� g�����)P@�H �$ g �8@�� �. g������a@T)�up�range�forward�down�wheel�position�backward�right�goto�centerpiece� getscreen�tracer)�selfZhomePos�scale�i� r �-/usr/lib64/python3.6/turtledemo/bytedesign.py�design s zDesigner.designc C s� | j d� xtd�D ]}| j||� qW | j� | jd� xtd�D ]}| j||� qDW | jd� xFtd�D ]:}| j� | j d� | jd| � | j� | jd| � qlW | jd� | j � j � d S )N�6 � r r r � )r r � pentpiecer �left�tripiecer r r r �update)r �initposr r r r r r 2 s zDesigner.wheelc C s� | j � }| j� | jd| � | jd| |� | j� | j|� | j|� | j� | jd| � | jd| |� | j� | j|� | j|� | jd� | j � j � d S )Ng @g �?@r )�headingr r �tripolyrr r � setheading�tripolylr! r r# )r r$ r �oldhr r r r"