o
    ǋ|c                     @   s<   d Z ddlT dd Zdd Zedkree  e  dS dS )	aF        turtle-example-suite:

         tdemo_round_dance.py

(Needs version 1.1 of the turtle module that
comes with Python 3.1)

Dancing turtles have a compound shape
consisting of a series of triangles of
decreasing size.

Turtles march along a circle while rotating
pairwise in opposite direction, with one
exception. Does that breaking of symmetry
enhance the attractiveness of the example?

Press any key to stop the animation.

Technically: demonstrates use of compound
shapes, transformation of shapes as well as
cloning turtles. The animation is
controlled through update().
    )*c                   C   s   da d S )NF)running r   r   (lib/python3.10/turtledemo/round_dance.pystop   s   r   c                  C   s  t   td td td d} d}d}d}td}td	D ]"}t| t }|| 9 }|| 9 }t|  |	||d
d| fd qt
d| td td t  tdd g }tdD ]}td td td t  |d dkrz|t  q]t  datt t  d}trd}	|D ]}
|
d |
d |
|	 |	dkrdnd}	q|dk rtd t| |d9 }t  tsdS )NZgray10FZtriangleg}Rc?gy!"@      Zcompound
   g      ?ZblackZmultitrir   i8            T   gGz?zDONE!)ZclearscreenZbgcolorZtracershapeZShaperangeZ	shapesizeZget_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetposfdltupdateappendZclonehomer   Z
onkeypressr   Zlistenright)fZphiscshipZdancerscstaZdancerr   r   r   main   sb   





r    __main__N)__doc__Zturtler   r    __name__printZmainloopr   r   r   r   <module>   s    5

