o
    OZŽhf  ã                	   @   s–  d Z ddlZddlZdZdZdZe dd¡ZdZ	e 
¡  ej e¡Zej ¡ Zdag aG dd	„ d	ƒZd
d„ Zeƒ  dZdZerÅej ¡ D ],ZejejkrNdZejejkrYej ¡ aejejkrpejej krgdZejej!krpeƒ  qDe "d¡ tD ]-Z#tdur›ze#j$ %te#j&e ¡ W n e'yš   e(dej)› dƒ‚w ej* +ede#j$e	¡ qxej ,¡  e -d¡Zej .de/e 0¡ dƒ› de1tƒ› ¡ es?e 2¡  dS )aK   pg.examples.go_over_there
This simple tech demo is showcasing the use of Vector2.move_towards()
using multiple circles to represent Vectors. Each circle will have a
random position and speed once the demo starts.

Mouse Controls:
* Use the mouse to click on a new target position

Keyboard Controls:
* Press R to restart the demo
é    Ng      Ð?é   i@  iè  iX  c                   @   s   e Zd Zdd„ ZdS )ÚBallc                 C   s   || _ || _d S )N)ÚpositionÚspeed)Úselfr   r   © r   úL/var/www/auris/lib/python3.10/site-packages/pygame/examples/go_over_there.pyÚ__init__   s   
zBall.__init__N)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r      s    r   c               	   C   sb   d a g attƒD ]&} t t dtt	j
ƒ¡t dtt	jƒ¡¡}t tt¡}t||ƒ}t |¡ qd S )Nr   )Útarget_positionÚballsÚrangeÚ	MAX_BALLSÚpgÚVector2ÚrandomÚrandintÚintÚSCREEN_SIZEÚxÚyÚuniformÚ	MIN_SPEEDÚ	MAX_SPEEDr   Úappend)r   Úposr   Úbr   r   r   Úreset$   s    ÿ
ùr   TF)é   é   éA   zVersion z[ doesn't have Vector.move_towards_ip function.
                    Please update to >=2.1.3)év   éÏ   é‘   é<   zfps: é   z, ball count: )3Ú__doc__Zpygamer   r   r   r   r   r   r   ZCIRCLE_RADIUSÚinitÚdisplayÚset_modeÚscreenÚtimeZClockÚclockr   r   r   r   Z
delta_timeÚrunningÚeventÚgetÚtypeZQUITZMOUSEBUTTONUPÚmouseZget_posZKEYUPÚkeyZK_ESCAPEZK_rÚfillÚor   Zmove_towards_ipr   ÚAttributeErrorÚRuntimeErrorÚ__version__ZdrawÚcircleÚflipZtickZset_captionÚroundZget_fpsÚlenÚquitr   r   r   r   Ú<module>   s`    

€
ÿÿ

ÿâ"