����JFIF��x�x������Exif��MM�*���� ����E���J����������������(������������������
Server IP : 103.191.208.227 / Your IP : 3.147.73.36 Web Server : LiteSpeed System : Linux emphasis.herosite.pro 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64 User : mhmsfzcs ( 1485) PHP Version : 8.1.31 Disable Function : show_source, system, shell_exec, passthru, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/../lib64/python3.11/turtledemo/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
� �=Ogq � �` � d Z ddlZddlZddlZdZdZdZdZedz Zeedz d z edz d z z z Z dZ dZd Zd� Z d� Zd� Z G d� de� � Z G d� dej � � Z G d� de� � Z G d� de� � Z G d� de� � Zd� Zedk r e� � ej � � dS dS )z� turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick is the winner. Implements the model-view-controller design pattern. � Ni� i� � � � � � � )�? r r )� �� r )r r r c �@ � t j t t � � S �N)�random�randint� MINSTICKS� MAXSTICKS� � �'/usr/lib64/python3.11/turtledemo/nim.py� randomrowr s � ��>�)�Y�/�/�/r c �� � | d | d z | d z }|dk rt | � � S t d� � D ]!}| | |z }|| | k r||f}|c S �"d S )Nr � r � )� randommove�range)�state�xored�z�s�moves r �computerzugr ! s� � ��!�H�u�Q�x��%��(�*�E���z�z��%� � � � �1�X�X� � ���!�H�u�����a��=�=��q�6�D��K�K�K� �� r c � � t | � � } t j dd� � }| | |dk k rn�'t j |dk | | dz � � }||fS )NTr r r )�maxr r )r �mr �rands r r r + sf � ��E� � �A���N�1�Q������8�q�1�u����� �>�!�a�%��q��!��,�,�D��d�7�Nr c �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )�NimModelc � � || _ d S r )�game)�selfr( s r �__init__zNimModel.__init__6 s � ��� � � r c �2 � | j j t j t j fvrd S t � � t � � t � � g| _ d| _ d | _ | j j � � � t j | j _ d S )Nr )r( r �Nim�CREATED�OVERr �sticks�player�winner�view�setup�RUNNING�r) s r r3 zNimModel.setup9 sl � ��9�?�3�;���"9�9�9��F� �{�{�I�K�K����=���������� ��������+�� ���r c � � | j | }|| j |<