
    dQ                         d Z ddlmZmZmZ ddlmZmZ d Z	d Z
edk    r! e
            Z ee            e             dS dS )aF        turtle-example-suite:

          tdemo_wikipedia3.py

This example is
inspired by the Wikipedia article on turtle
graphics. (See example wikipedia1 for URLs)

First we create (ne-1) (i.e. 35 in this
example) copies of our first turtle p.
Then we let them perform their steps in
parallel.

Followed by a complete undo().
    )ScreenTurtlemainloop)perf_countersleepc                    | g}t          d|          D ]E}|                                 }|                    d|z             |                    |           |} Ft          |          D ]i}t	          |dz  |z
            |dz  z  }|D ]I}|                    d|z             |                    d|z
  d|           |                    |           Jjd S )N   g     v@g       @gffffff?r   )rangeclonertappendabspencolorfd)pnesz
turtlelistiqcts           $  /croot/python-split_1694437901252/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/turtledemo/rosette.pymn_eckr      s    J1R[[  GGII	U2X!2YY  3qMM2b5!  	 	ADDbMMMJJqs1QDDHHHH		     c                     t                      } |                     d           t                      }|                    d           |                                 |                    d           |                    d           |                     dd           t                      }t          |dd           t                      }||z
  }t          d           t                      }t          d |                                 D                       rV|                                 D ]}|                                 t          d |                                 D                       Vt                      }d	||z   |z
  z  S )
Nblackr   red   $      r	   c              3   >   K   | ]}|                                 V  d S )N)undobufferentries).0r   s     r   	<genexpr>zmain.<locals>.<genexpr>7   s.      99a!!##999999r   zruntime: %.3f sec)r   bgcolorr   speed
hideturtler   pensizetracerclockr   r   anyturtlesundo)sr   atetz1r   s         r   mainr3   $   sI   AIIghhAGGAJJJLLNNNJJuIIaLLLHHRNNN	B
1b"	B	BB	!HHH	B
99QYY[[999
9
9  	 	AFFHHHH 99QYY[[999
9
9  
B"R%(++r   __main__N)__doc__turtler   r   r   timer   r+   r   r   r3   __name__msgprint r   r   <module>r<      s     , + + + + + + + + + - - - - - - - -  ", , ,4 z
$&&C	E#JJJHJJJJJ r   