{"id":308972,"date":"2020-08-25T15:00:38","date_gmt":"2020-08-25T15:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308972"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308972","title":{"rendered":"\u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0438\u0433\u0440\u0430, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u043c\u043d\u043e\u044e \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 windows \u043a\u043e\u043d\u0441\u043e\u043b\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516548\/\">\n<h2>\u041f\u0440\u0438\u0432\u0435\u0442! <\/h2>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043e\u043f\u0438\u0448\u0443 \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u0445, \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u0433\u0440\u0443 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0430 \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041e\u0442\u043a\u0443\u0434\u0430 \u0438\u0434\u0435\u044f?<\/h3>\n<p>  \u042f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0438\u0434\u0435\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u043e \u0432 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u044b\u0441\u043b\u044c, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0433\u0440\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0432 \u043f\u043b\u0430\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/playgendary\/blog\/488222\/\">\u044d\u0442\u0443<\/a> \u0438\u0433\u0440\u0443.<\/p>\n<h3>\u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a<\/h3>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0438\u0433\u0440\u0430 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u043a\u043e\u0440\u043d\u0435, \u0438 \u043a\u0430\u043a\u043e\u0432\u0430 \u0435\u0435 \u0438\u0434\u0435\u044f \u0440\u0430\u0431\u043e\u0442\u044b. <\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043c\u0438\u0440 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0446\u0438\u043a\u043b\u043e\u043c <code>for<\/code>.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"python\">for line_words in OUTPUT_IMAGE:        for word in line_words:            print(word, end=&quot;&quot;)        print(&quot;\\n&quot;, end=&quot;&quot;) <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0447\u0442\u043e\u0431 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043f\u0438\u0441\u043a\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ry\/y2\/nb\/ryy2nbk5zsbrrftc9lm9ff_pkmk.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0443\u0442 c\u0440\u0430\u0437\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043d\u0430\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e X \u0438 Y \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c:<\/p>\n<p>  X \u2014 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435<br \/>  Y \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f X<br \/>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u043b\u0435 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0438\u043c\u0432\u043e\u043b. \u042d\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. <\/p>\n<p>  \u041c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u043b\u0435 \u00ab\u043c\u044f\u0447\u00bb, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e X \u0438 Y \u0431\u0443\u043a\u0432\u0443 \u00abO\u00bb.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">import os OUTPUT_IMAGE = [         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         ]  OUTPUT_IMAGE[4][6] = &quot;O&quot; os.system(&quot;cls||clear&quot;) for line_words in OUTPUT_IMAGE:        for word in line_words:            print(word, end=&quot;&quot;)        print(&quot;\\n&quot;, end=&quot;&quot;)  <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oi\/qk\/wv\/oiqkwvu5urrnlfxgsamwsz8ifei.png\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u0432\u043e\u0442, \u043c\u044b \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u043e\u043b\u0435. \u041f\u0440\u0430\u0432\u0434\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b X \u0438 Y \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438. \u0412\u043e \u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 Y, \u043f\u043e\u0442\u043e\u043c X, \u0447\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0435, \u0432\u043e \u0432\u0442\u043e\u0440\u044b\u0445, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 Y \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e\u0431 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u0443 \u043d\u0430\u0441 \u0436\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u0441\u044f.<\/p>\n<p>  \u0413\u0440\u0430\u0444\u0438\u043a X \u0438 Y \u0432 \u0438\u0433\u0440\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i_\/tk\/zm\/i_tkzmzb8tcbbanmjd8xxdemvli.png\" alt=\"image\"\/><\/p>\n<p>  \u042d\u0442\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043d\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u0442.\u0435. \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f.<br \/>  \u042d\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"python\">os.system(&quot;cls||clear&quot;) <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>OUTPUT_IMAGE<\/code>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u043e\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 <code>while True<\/code>. <\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 <code>while True<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>time.sleep(1)<\/code>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c FPS.<\/p>\n<p>  \u0418 \u0432\u043e\u0442, \u043a\u043e\u0434 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0437\u0430\u0445:<\/p>\n<pre><code class=\"python\">from time import sleep from os import system OUTPUT_IMAGE = [         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],         ]  x = 0 y = 0 while True:       sleep(1)       system(&quot;cls||clear&quot;)       OUTPUT_IMAGE[y][x] = &quot;O&quot;       for line_words in OUTPUT_IMAGE:              for word in line_words:                  print(word, end=&quot;&quot;)              print(&quot;\\n&quot;, end=&quot;&quot;)       y += 1       x += 1       OUTPUT_IMAGE = [             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             ] <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4v\/bk\/ws\/4vbkwszg7hhqznt-gv9oikurmtm.gif\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u043f\u043e\u043b\u044e.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430 \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b, \u0438 \u043d\u0430\u0434\u043e \u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u0442\u0438\u043f\u0443 \u0438\u0433\u0440\u043e\u043a\u043e\u0432, \u0434\u043e\u043c\u043e\u0432, \u0435\u0434\u044b\u2026<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u043a\u0430\u0437\u0430\u0432 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0435\u0433\u043e X \u0438 Y. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 (\u0441\u0438\u043c\u0432\u043e\u043b\u044b), X, Y;<\/p>\n<p>  \u0422\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<pre><code class=\"python\">def SetImage(image: str, x: int, y: int):     pass <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043e\u0441\u0438 X \u0438 Y, \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u0442\u0430\u043a: <br \/>  \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0435\u0433\u043e \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0438 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &quot;\\n&quot;, \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u044c Y.<\/p>\n<p>  \u041e\u0441\u044c Y \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f, \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u0430\u044f \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a \u043d\u0435\u0439 \u043c\u044b \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442. <\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443:<\/p>\n<pre><code class=\"python\">image = &quot; O\\n'|'\\n |&quot;#\u0438\u0433\u0440\u043e\u043a <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">def SetImage(x: int, y: int, image: str):   x_start = x   x = x   y = y   for word in image:       if word == &quot;\\n&quot;:           x = x_start           y += 1       else:           x += 1           try:             OUTPUT_IMAGE[y][x] = word           except IndexError:               break <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c <code>try: except()<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 X \u0438 Y \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u044c\u0435\u043d\u044c\u043a\u0438\u0435 \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435.<\/p>\n<p>  <code>x_start<\/code> \u042d\u0442\u043e X, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 Y (\u043f\u0440\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0435 &quot;\\n&quot;)<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u0435 X \u0438 Y, \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from time import sleep from os import system OUTPUT_IMAGE = [       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       ]  def SetImage(x: int, y: int, image: str):   x_start = x   x = x   y = y   for word in image:       if word == &quot;\\n&quot;:           x = x_start           y += 1       else:           x += 1           try:             OUTPUT_IMAGE[y][x] = word           except IndexError:               break while True:       sleep(1)       system(&quot;cls||clear&quot;)       SetImage(x=3,y=4,image=&quot; O\\n'|'\\n |&quot;)       for line_words in OUTPUT_IMAGE:              for word in line_words:                  print(word, end=&quot;&quot;)              print(&quot;\\n&quot;, end=&quot;&quot;)       OUTPUT_IMAGE = [             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             ] <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fw\/xc\/nt\/fwxcntnk-q8wf8cg4i8zxwt7eaa.png\" alt=\"image\"\/><\/p>\n<p>  \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0448\u0430\u0440\u0438\u043a \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0438, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043f\u043e \u043e\u0441\u0438 X \u0438 Y. <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from time import sleep from os import system OUTPUT_IMAGE = [       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       ] px = 0 py = 0 def SetImage(x: int, y: int, image: str):   x_start = x   x = x   y = y   for word in image:       if word == &quot;\\n&quot;:           x = x_start           y += 1       else:           x += 1           try:             OUTPUT_IMAGE[y][x] = word           except IndexError:               break while True:       sleep(1)       system(&quot;cls||clear&quot;)       SetImage(x=px,y=py,image=&quot; O\\n'|'\\n |&quot;)       for line_words in OUTPUT_IMAGE:              for word in line_words:                  print(word, end=&quot;&quot;)              print(&quot;\\n&quot;, end=&quot;&quot;)       px += 1       py += 1       OUTPUT_IMAGE = [             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             ] <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oh\/8j\/nb\/oh8jnb5ivizagoxy55o5l-p1hk0.gif\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u0432\u043e\u0442, \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0434\u0432\u0438\u0433\u0430\u0435\u0442 \u0438\u0433\u0440\u043e\u043a \u043f\u043e \u043a\u0430\u0440\u0442\u0435.<\/p>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e\u0435, \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0438\u0433\u0440\u043e\u043a, \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0430, \u0438 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0433\u0440\u0443, \u043d\u043e \u043d\u0435\u0442. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0447\u0435\u0442\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0432\u0435\u0434\u044c \u043a\u0430\u043a\u0430\u044f \u044d\u0442\u043e \u0438\u0433\u0440\u0430 \u0431\u0435\u0437 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u0445\u0438\u0442\u0431\u043e\u043a\u0441.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e \u0442\u0430\u043a\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435: <\/p>\n<p>  X \u2014 \u0445\u0438\u0442\u0431\u043e\u043a\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u043e X \u0448\u0438\u0440\u0438\u043d\u0435, \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 &quot;\\n&quot; \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435<br \/>  Y \u2014 \u0445\u0438\u0442\u0431\u043e\u043a\u0441 \u043f\u043e Y \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 &quot;\\n&quot; \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435<\/p>\n<p>  \u041f\u043e \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0443 \u043d\u0435\u0435 \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043c\u0435\u0436\u0434\u0443 &quot;\\n&quot;, \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0448\u0438\u0440\u043e\u0442\u0430.<br \/>  \u0418 \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b &quot;\\n&quot;, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u0442\u0430.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"python\">def GetSizeObject(img: str):     w = 0     weights = []     h = [word for word in img if word == &quot;\\n&quot;]      for word in img:       if word == &quot;\\n&quot;:           weights.append(w)           w = 0       else:           w += 1       try:           return {&quot;w&quot;: max(weights), &quot;h&quot;:len(h)}       except ValueError:             return {&quot;w&quot;: 0, &quot;h&quot;:0}  <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0417\u0430\u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c ValueError except?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041e\u043d \u0437\u0434\u0435\u0441\u044c \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438\u0433\u0440\u044b.  <\/div>\n<\/p><\/div>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430, \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b \u0435\u0433\u043e \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0434\u043b\u0438\u043d\u0443.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043a\u043e\u0434 \u0441 \u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from time import sleep from os import system OUTPUT_IMAGE = [       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       ] px = 3 py = 3 def SetImage(x: int, y: int, image: str):     global OUTPUT_IMAGE           x_start = x     x = x     y = y     for word in image:         if word == &quot;\\n&quot;:             x = x_start             y += 1         else:             x += 1             try:               OUTPUT_IMAGE[y][x] = word             except IndexError:                 break  def GetSizeObject(img: str):     w = 0     weights = []     h = [word for word in img if word == &quot;\\n&quot;]     h.append(1)      for word in img:         if word == &quot;\\n&quot;:             weights.append(w)             w = 0         else:             w += 1     try:         return {&quot;w&quot;: max(weights), &quot;h&quot;:len(h)}     except ValueError:         return {&quot;w&quot;: 0, &quot;h&quot;:0}  player_image = &quot; O\\n'|'\\n |&quot; def draw():       global OUTPUT_IMAGE       sleep(1)       system(&quot;cls||clear&quot;)       for line_words in OUTPUT_IMAGE:              for word in line_words:                  print(word, end=&quot;&quot;)              print(&quot;\\n&quot;, end=&quot;&quot;)       OUTPUT_IMAGE = [             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             ] while True:     SetImage(x=px,y=py,image=player_image)     print(GetSizeObject(img=player_image))     draw()  <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0423\u0440\u0430! \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0445\u0438\u0442\u0431\u043e\u043a\u0441\u0430 \u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. <\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443\u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e. \u042f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 2 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0445\u0438\u0442\u0431\u043e\u043a\u0441\u044b, \u0422.\u0415. \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aq\/bn\/ok\/aqbnok5vxupfkgiqafbabbgkkfq.png\" alt=\"image\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430\u0445<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u0434\u0430\u0435\u043c <\/p>\n<p>  x \u2014 X \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  y \u2014 Y \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <br \/>  h \u2014 \u0412\u044b\u0441\u043e\u0442\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  w \u2014 \u0428\u0438\u0440\u043e\u0442\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  x2 \u2014 X \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  y2 \u2014 Y \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <br \/>  h2 \u2014 \u0412\u044b\u0441\u043e\u0442\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  w2 \u2014 \u0428\u0438\u0440\u043e\u0442\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/p>\n<p>  \u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<p>  \u0435\u0441\u043b\u0438 <br \/>  <code>y<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 <code>y2 - h2 + h<\/code> \u0438 <code>y - h<\/code> \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <code>y2 + h2 - h<\/code><br \/>  \u0438\u043b\u0438 \u0436\u0435 <br \/>  <code>y2<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 <code>y - h + h2<\/code> \u0438 <code>y2 - h2<\/code> \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <code>y + h - h2<\/code>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0417\u0430\u0447\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c 2 \u0440\u0430\u0437\u0430?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 2 \u0440\u0430\u0437\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435\/\u043d\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u043e\u043f\u0440\u0438\u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043e\u0441\u0438 Y  <\/div>\n<\/p><\/div>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u043c\u043e\u0442\u0440\u0438 \u0441\u043e\u043f\u0440\u0438\u043a\u043e\u0441\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u0438 X, \u043e\u043d\u0430 \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0447\u0442\u043e \u0438 \u043f\u043e \u043e\u0441\u0438 Y, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e <code>y<\/code> \u2014 <code>x<\/code>, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e <code>h<\/code> \u2014 <code>w<\/code>.<\/p>\n<p>  \u0435\u0441\u043b\u0438:<\/p>\n<p>  <code>x<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 <code>x2 - w2 + w<\/code> \u0438 <code>x - w<\/code> \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <code>x2 + w2 - w<\/code><\/p>\n<p>  \u0438\u043b\u0438 \u0436\u0435 <\/p>\n<p>  <code>x2<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 <code>x - w + w2<\/code> \u0438 <code>x2 - w2<\/code> \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c <code>x + w - w2<\/code><\/p>\n<p>  \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u043e\u043f\u0440\u0438\u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043e\u0441\u0438 X  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u043e\u0433\u0438\u043a\u0430 \u0432 \u043a\u043e\u0434\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041b\u043e\u0433\u0438\u043a\u0430 \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043a\u0430\u043a \u0438 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430\u0445, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">def IsClash(x: int, y: int, h: int, w: int,x2: int, y2: int, h2: int, w2: int):     if (y &gt;= y2 - h2 + h and y - h &lt;= y2 + h2 - h) or (y2 &gt;= y - h + h2 and y2 - h2 &lt;= y + h - h2):         if (x &gt;= x2 - w2 + w and x - w &lt;= x2 + w2 - w) or (x2 &gt;= x - w + w2 and x2 - w2 &lt;= x + w - w2):             return True      return False <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>True <\/code>\u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u043e\u043f\u0440\u0438\u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f, \u0438 <code>False<\/code> \u0435\u0441\u043b\u0438 \u043d\u0435\u0442.  <\/div>\n<\/p><\/div>\n<p>  \u042f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0443\u0431 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u043e\u043b\u0435, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u043e\u043a\u0443 \u0431\u044b\u043b\u043e \u0441 \u043a\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0418 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0441\u0447\u0435\u0442\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u043e\u0442 \u0438\u0433\u0440\u043e\u043a \u0441\u043e\u043f\u0440\u0438\u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438 \u043a\u0443\u0431\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rr\/uv\/-o\/rruv-o21eayj5tzhwoip2rzrkok.png\" alt=\"image\"\/><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u043d\u0435\u0442 \u0441\u043e\u043f\u0440\u0438\u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/51\/ig\/gw\/51iggwyrnhrbdg2z_ol-wed8fuw.png\" alt=\"image\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u0441\u043e\u043f\u0440\u0438\u043a\u043e\u0441\u043d\u043e\u0432\u0435\u043d\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u043e \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u043f\u0440\u0438\u043a\u043e\u0441\u043d\u043e\u0432\u0435\u043d\u0438\u044f\/\u043d\u0435 \u0441\u043e\u043f\u0440\u0438\u043a\u043e\u0441\u043d\u043e\u0432\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">from time import sleep from os import system OUTPUT_IMAGE = [       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],       ]  def SetImage(x: int, y: int, image: str):     global OUTPUT_IMAGE           x_start = x     x = x     y = y     for word in image:         if word == &quot;\\n&quot;:             x = x_start             y += 1         else:             x += 1             try:               OUTPUT_IMAGE[y][x] = word             except IndexError:                 break  def GetSizeObject(img: str):     w = 0     weights = []     h = [word for word in img if word == &quot;\\n&quot;]     h.append(1)      for word in img:         if word == &quot;\\n&quot;:             weights.append(w)             w = 0         else:             w += 1     try:         return {&quot;w&quot;: max(weights), &quot;h&quot;:len(h)}     except ValueError:         return {&quot;w&quot;: 0, &quot;h&quot;:0}  def IsClash(x: int, y: int, h: int, w: int,x2: int, y2: int, h2: int, w2: int):     if (y &gt;= y2 - h2 + h and y - h &lt;= y2 + h2 - h) or (y2 &gt;= y - h + h2 and y2 - h2 &lt;= y + h - h2):         if (x &gt;= x2 - w2 + w and x - w &lt;= x2 + w2 - w) or (x2 &gt;= x - w + w2 and x2 - w2 &lt;= x + w - w2):             return True      return False  player_image = &quot; O\\n'|'\\n |&quot; cube_image = &quot;____\\n|  |\\n----&quot; cx = 5# cy = 4  #\u041c\u0435\u043d\u044f\u0439\u0442\u0435 \u044d\u0442\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u043a\u0443\u0431\u0430 px = 10  # py = 3# def draw():       global OUTPUT_IMAGE       sleep(1)       system(&quot;cls||clear&quot;)       for line_words in OUTPUT_IMAGE:              for word in line_words:                  print(word, end=&quot;&quot;)              print(&quot;\\n&quot;, end=&quot;&quot;)       OUTPUT_IMAGE = [             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;,],             ] while True:     SetImage(x=px,y=py,image=player_image)     SetImage(x=cx,y=cy,image=cube_image)     print(&quot;is clash: &quot;,IsClash(       x=px,       x2=cx,       y=py,       y2=cy,       h=GetSizeObject(img=player_image)[&quot;h&quot;],       h2=GetSizeObject(img=cube_image)[&quot;h&quot;],       w=GetSizeObject(img=player_image)[&quot;w&quot;],       w2=GetSizeObject(img=cube_image)[&quot;w&quot;],       ))     draw()  <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0433\u0440\u044b, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u044f \u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443.<\/p>\n<h2>\u0418\u0433\u0440\u0430<\/h2>\n<p>  \u0418\u0434\u0435\u044f \u0438\u0433\u0440\u044b \u0432 \u0442\u0430\u043a\u0430\u044f: <\/p>\n<p>  <i>\u0415\u0441\u0442\u044c \u0438\u0433\u0440\u043e\u043a, \u0432\u043e\u043a\u0440\u0443\u0433 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0447\u0442\u043e\u0431 \u043d\u0435 \u0443\u043c\u0435\u0440\u0435\u0442\u044c. \u0412 \u0438\u0433\u0440\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0435\u0434\u0443, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c, \u0441\u044a\u0435\u0441\u0442\u044c \u0435\u0435 \u0438\u0437 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043f\u043e\u043b \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0438\u0437 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f<\/i><\/p>\n<p>  \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u0432 3 \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e <code>While True<\/code>:<\/p>\n<pre><code class=\"python\">from time import sleep while True:     sleep(0.1) <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u043c, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0430\u0439\u043b main.py \u0438 \u043f\u0430\u043f\u043a\u0443 lib, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0444\u0430\u0439\u043b lib.py \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b \u043a\u043b\u0430\u0441\u0441 \u0438\u0433\u0440\u044b. \u0422.\u0415. \u0444\u0430\u0439\u043b\u044b \u0438\u0433\u0440\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">+----game |    + --  |    | -- main.py |    \\ --lib |         +--lib.py -&gt; class Game() |         \\ | +---<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c Game(), \u0432 main.py \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u043b \u0435\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0438\u0433\u0440\u0443.<\/p>\n<p>  \u0412 \u043a\u043b\u0430\u0441\u0441\u0435 game \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e run(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0443\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b. \u0422\u0430\u043a\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e draw_all(), \u043e\u043d\u0430 \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0440\u0438\u0441\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0435, \u0438 \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<p>  \u0418 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"python\">from time import sleep   class Game():     def __init__(self):         self.OUTPUT_IMAGE = []  # \u0437\u0434\u0435\u0441\u044c \u0438\u0433\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435      def draw_all(self):         for line_words in self.OUTPUT_IMAGE:             for word in line_words:                 print(word, end=&quot;&quot;)             print(&quot;\\n&quot;, end=&quot;&quot;)      def run(self):         while True:             self.draw_all()             sleep(0.1)  <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e \u0442\u0438\u043f\u0443 <code>set_image()<\/code>,<code> size_object()<\/code>, <code>is_clash()<\/code>, \u0438 \u0432\u0441\u0435 \u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c, \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u043b \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>create_object()<\/code> \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>self.OBJECTS<\/code>, \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>create_object()<\/code>\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <code>img<\/code>, <code>name<\/code>, <code>x<\/code>, <code>y<\/code>, <code>up<\/code>, <code>rigid<\/code>, <code>data<\/code>. <\/p>\n<p>  <code>img<\/code> \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <br \/>  <code>name<\/code> \u2014 \u0438\u043c\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u0434\u043e\u043c, \u0442\u0440\u0430\u0432\u0430, \u0436\u0438\u0442\u0435\u043b\u044c, \u0435\u0434\u0430 \u0438.\u0442.\u043f.)<br \/>   <code>x<\/code> \u2014 X \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>   <code>y<\/code> \u2014 Y \u043e\u0431\u044a\u0435\u043a\u0442\u0430<br \/>  <code>up<\/code> \u2014 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 True, \u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0434 \u0438\u0433\u0440\u043e\u043a\u043e\u043c, \u0438\u043d\u0430\u0447\u0435 \u0438\u0433\u0440\u043e\u043a \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u043e\u0439<br \/>   <code>rigid<\/code> \u2014 \u0442\u0432\u0435\u0440\u0434\u043e\u0441\u0442\u044c, \u0438\u0433\u0440\u043e\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 (\u0435\u0449\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e)<br \/>   <code>data<\/code> \u2014 \u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0435\u0433\u043e \u043b\u0438\u0447\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">create_object()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 \u043c\u0435\u043d\u044f \u0432 \u0438\u0433\u0440\u0435:<\/p>\n<pre><code class=\"python\">def CreateObject(self,x: int, y: int, img: str, name: str = None, up: bool = False, rigid: bool = False, data: dict = {}):     size_object = self.GetSizeObject(img=img)     self.OBJECTS.append(         {&quot;name&quot;: name,          &quot;x&quot;: x,          &quot;y&quot;: y,          &quot;up&quot;: up,          &quot;rigid&quot;: rigid,          &quot;h&quot;:size_object[&quot;h&quot;],          &quot;w&quot;:size_object[&quot;w&quot;],          &quot;id&quot;:uuid4().hex,          &quot;data&quot;:data,          &quot;img&quot;: img}     ) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0438\u0433\u0440\u043e\u043a\u0430, \u0434\u043e\u043c, \u0442\u0440\u0430\u0432\u0443, \u0438 \u0436\u0438\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0418 \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>up<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>Home<\/code>, \u0422.\u0415. \u0447\u0442\u043e\u0431 \u0434\u043e\u043c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b \u0441\u043e\u0431\u043e\u0439 \u0438\u0433\u0440\u043e\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e CheckAll(), \u0446\u0438\u043a\u043b\u043e\u043c for \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c, \u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0438\u0445 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0422.\u0415. \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e SetImage(x: int, y: int, img:str), \u043f\u043e\u0434\u0430\u0432\u0430\u044f \u0432 \u043d\u0435\u0435 X \u0438 Y \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443.<\/p>\n<p>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u0438\u0433\u0440\u043e\u043a. \u0412 \u044d\u0442\u043e\u043c \u0436\u0435 \u0446\u0438\u043a\u043b\u0435 \u044f \u043e\u0431\u044a\u044f\u0432\u0438\u043b \u0441\u043f\u0438\u0441\u043e\u043a<code>up_of_payer_objects<\/code>, \u0438 \u0435\u0441\u043b\u0438 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0442\u043e\u044f\u043b up=True, \u0442\u043e \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0435\u0433\u043e \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u043d\u0435 \u0440\u0438\u0441\u0443\u044f \u0435\u0433\u043e \u043d\u0430 \u043f\u043e\u043b\u0435. \u041f\u043e\u0441\u043b\u0435 \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u0446\u0438\u043a\u043b\u043e\u043c for \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u0432 up_of_payer_objects, \u0440\u0438\u0441\u0443\u044f \u0438\u0445, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043d\u0430\u0434 \u0438\u0433\u0440\u043e\u043a\u043e\u043c. <\/p>\n<pre><code class=\"python\">def CheckAll(self):     up_of_payer_objects = []     for object_now in range(len(self.OBJECTS)):         if object_now[&quot;up&quot;]:             up_of_payer_objects.append(object_now)             continue         self.SetImage(x=object_now[&quot;x&quot;],y=object_now[&quot;y&quot;],image=object_now[&quot;img&quot;]) <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0437\u0430\u043d\u044f\u043b\u0441\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u0433\u0440\u043e\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0435\u0433\u043e \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 <code>self.OBJECTS<\/code>, \u043d\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>self.PLAYER<\/code>.<\/p>\n<p>  \u0412\u0441\u0435 \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u043e \u0442\u0438\u043f\u0443 <code>X<\/code>, <code>Y<\/code>, <code>img<\/code>, \u0438.\u0442.\u043f. \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0439, \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u044d\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c (dict). \u0421 \u0442\u0430\u043a\u0438\u043c \u0438\u0433\u0440\u043e\u043a\u043e\u043c \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0434\u0432\u0438\u0433\u0430\u0442\u044c, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f. \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f.<br \/>  \u041d\u0430\u0447\u0430\u043b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e CheckKeysObjects(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448, \u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0432\u044b\u0437\u044b\u0432\u0430\u044e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 CheckAll() \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 <\/p>\n<pre><code class=\"python\">def CheckAll(self):     self.CheckKeysObjects()     .... <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/pypi.org\/project\/keyboard\/\">keyboard<\/a>, \u0438 4 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<p>  <code>self.WALK_LEFT_PLAYER <br \/>  self.WALK_RIGHT_PLAYER<br \/>  self.WALK_UP_PLAYER<br \/>  self.WALK_DOWN_PLAYER<br \/>  <\/code><br \/>  \u0418 \u0432\u0441\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0432\u0438\u0448\u0438, \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c <code>d<\/code>, \u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>self.WALK_RIGHT_PLAYER<\/code> \u0434\u0435\u043b\u0430\u0435\u043c <code>True<\/code>.<\/p>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 <code>False<\/code>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0430-\u0442\u043e \u0438\u0433\u0440\u043e\u043a \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">CheckKeysObjects()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def CheckKeysObjects(self):     #\u0434\u0435\u043b\u0430\u044e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 False, \u0447\u0442\u043e\u0431 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b     self.WALK_LEFT_PLAYER = False     self.WALK_RIGHT_PLAYER = False     self.WALK_UP_PLAYER = False     self.WALK_DOWN_PLAYER = False     #\u0430 \u0442\u0443\u0442 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u043d\u0430\u0436\u0430\u0442\u0438\u044f     if keyboard.is_pressed(&quot;a&quot;):         self.WALK_LEFT_PLAYER = True     elif keyboard.is_pressed(&quot;d&quot;):         self.WALK_RIGHT_PLAYER = True     if keyboard.is_pressed(&quot;w&quot;):         self.WALK_UP_PLAYER = True     elif keyboard.is_pressed(&quot;s&quot;):         self.WALK_DOWN_PLAYER = True <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>CheckAll()<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u0432\u0441\u0435 \u043f\u0435\u0440\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u0443\u0437\u043d\u0430\u044e, \u043a\u0443\u0434\u0430 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0433\u0440\u043e\u043a.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0432 <code>True<\/code>, \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a\u0430\u044f, \u0438 \u0434\u0432\u0438\u0433\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def CheckAll(self):     self.CheckKeysObjects()  # check moves     up_of_payer_objects = []     for object_now in range(len(self.OBJECTS)):         self.PLAYER[&quot;img&quot;] = self.PLAYER[&quot;image_normal&quot;]         if self.WALK_LEFT_PLAYER:             self.OBJECTS[object_now][&quot;x&quot;] += 1          elif self.WALK_RIGHT_PLAYER:             self.OBJECTS[object_now][&quot;x&quot;] -= 1           if self.WALK_UP_PLAYER:              self.OBJECTS[object_now][&quot;y&quot;] += 1         elif self.WALK_DOWN_PLAYER:              self.OBJECTS[object_now][&quot;y&quot;] -= 1 <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0414\u0430, \u043c\u044b \u0434\u0432\u0438\u0433\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0438\u0434\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u0432\u043e, \u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043b\u0435\u0432\u043e. <\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0435\u0449\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0438 \u0437\u0430\u043d\u044f\u043b\u0441\u044f \u0441\u043f\u0430\u0432\u043d\u043e\u043c \u0435\u0434\u044b, \u0443 \u0438\u0433\u0440\u043e\u043a\u0430 \u0446\u0435\u043b\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0435\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043c\u0435\u0440\u0435\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u043e\u0442\u0441\u0447\u0435\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043f\u0430\u0432\u043d\u0430 \u0435\u0434\u044b, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>time.sleep()<\/code>, \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>threading<\/code> \u2014 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c 2 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0441\u043f\u0430\u0432\u043d \u0435\u0434\u044b \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043f\u0430\u0432\u043d\u0430 \u0435\u0434\u044b <code>SpawnEat()<\/code> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0435\u0434\u0443, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0435\u0434\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>CreateObject()<\/code>.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u043f\u0430\u0432\u043d\u0430 \u0435\u0434\u044b, \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0443 \u0438\u0433\u0440\u043e\u043a\u0430 <code>self.PLAYER[&quot;hungry&quot;]<\/code>, \u044d\u0442\u043e \u0435\u0433\u043e \u0433\u043e\u043b\u043e\u0434, \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043e\u043d \u0440\u0430\u0432\u0435\u043d \u2014 100 \u0435\u0434., \u0435\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0445\u043e\u0434\u0438\u0442 \u0438 \u0442\u0440\u0430\u0442\u0438\u0442 \u044d\u043d\u0435\u0433\u0440\u0438\u044e (\u0442\u0438\u043f\u0430 \u044d\u043d\u0435\u0440\u0433\u0438\u044e, \u0435\u0435 \u0432 \u0438\u0433\u0440\u0435 \u043d\u0435\u0442) \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0447\u0442\u043e-\u0442\u043e \u0441\u044a\u0435\u043b.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>MinimizeHungry()<\/code>, \u043e\u043d\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434, \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0443 \u0438\u0433\u0440\u043e\u043a\u0430 2 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0433\u043e\u043b\u043e\u0434\u0430. \u042d\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u043e\u043a\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f, \u0430 \u043d\u0435 \u0441\u0442\u043e\u044f\u0442\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Eat()<\/code>, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u043e\u0442 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u041e\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u0435\u0434\u044b \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0435\u0441\u043b\u0438 \u0435\u0434\u044b \u0431\u043e\u043b\u044c\u0448\u0435 10 \u0435\u0434. \u0442\u043e \u041d\u0415 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>SpawnEat()<\/code>, \u0435\u0441\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 10 \u0435\u0434. \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>SpawnEat()<\/code>.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a\u043e\u0439 \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Eat()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def Eat(self):     while True:         sleep(4)         if len([i for i in self.OBJECTS if i[&quot;name&quot;] == &quot;meat&quot;]) &lt; 10:             self.SpawnEat()         sleep(1)         self.MinimizeHungry() <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>Start()<\/code>, \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Start()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def Start(self):     while True:           self.CheckAll()         self.DrawAll()         sleep(0.01) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0418 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>run()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u044e \u0438\u0433\u0440\u0443.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">run()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def run(self):     proc1 = threading.Thread(target=self.Start)     proc1.start()     proc2 = threading.Thread(target=self.Eat)     proc2.start() <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0435\u0434\u0430\u043d\u0438\u044f, \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>CheckAll()<\/code> \u0438 <code>CheckKeysObjects()<\/code>. \u0412 <code>CheckKeysObjects()<\/code> \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043d\u0435 \u043d\u0430\u0436\u0430\u043b \u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>E<\/code>. \u0415\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u043b, \u0442\u043e \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>self.PRESS_E<\/code> \u0432 <code>True<\/code>.<\/p>\n<p>  \u0412 \u0446\u0438\u043a\u043b\u0435 <code>CheckAll()<\/code>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043d\u0435 \u0435\u0434\u0430 \u043b\u0438 \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 <code>for<\/code>, \u0435\u0441\u043b\u0438 \u0435\u0434\u0430 \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441 \u043d\u0438\u043c \u0438\u0433\u0440\u043e\u043a, \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>self.PRESS_E<\/code>, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0432 <code>True<\/code> \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u043b \u043e\u0431\u044a\u0435\u043a\u0442, \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b \u0433\u043e\u043b\u043e\u0434, \u0422.\u0415. \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>self.PLAYER[&quot;hungry&quot;]<\/code>. <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0432 \u043a\u043e\u0434\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">for object_now in range(len(self.OBJECTS)):     ....     if self.OBJECTS[object_now][&quot;name&quot;] == &quot;meat&quot;:         items_objects.append(object_now)         is_clash = self.IsClash(             x=self.OBJECTS[object_now][&quot;x&quot;],             y=self.OBJECTS[object_now][&quot;y&quot;],             h=self.OBJECTS[object_now][&quot;h&quot;],             w=self.OBJECTS[object_now][&quot;w&quot;],             x2=self.PLAYER[&quot;x&quot;],             y2=self.PLAYER[&quot;y&quot;],             h2=self.PLAYER[&quot;h&quot;],             w2=self.PLAYER[&quot;w&quot;],         )          if is_clash:             if self.PRESS_E:                 try:                     self.PLAYER[&quot;hungry&quot;] += self.HUNGRUY_ADD                     del self.OBJECTS[object_now]                     break                  except IndexError:                     pass <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<blockquote><p>\u0421\u043a\u0430\u0436\u0443 \u043d\u0430\u043f\u0435\u0440\u0435\u0434, \u044d\u0442\u043e \u0432\u0441\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043e\u0432\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0432\u0435\u0442\u043d\u0430\u0440\u044c <\/p><\/blockquote>\n<p>  <\/p>\n<h4>\u0414\u0435\u043b\u0430\u044e \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c.<\/p>\n<p>  \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e, \u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043f\u043e\u043b \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<p>  \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0438\u0433\u0440\u043e\u043a\u0443 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447, \u044d\u0442\u043e \u0431\u044b\u043b <code>self.PLAYER[&quot;inventory&quot;]<\/code>, \u0442\u0430\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f 4 \u044f\u0446\u0447\u0435\u0439\u043a\u0438, \u0432\u043e\u0442 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"python\">&quot;inventory&quot;:{     &quot;0&quot;:{&quot;status&quot;:&quot;space&quot;,&quot;name&quot;:&quot;#0&quot;, &quot;minimize_image&quot;:&quot;#0&quot;},     &quot;1&quot;:{&quot;status&quot;:&quot;space&quot;,&quot;name&quot;:&quot;#1&quot;, &quot;minimize_image&quot;:&quot;#1&quot;},     &quot;2&quot;:{&quot;status&quot;:&quot;space&quot;,&quot;name&quot;:&quot;#2&quot;, &quot;minimize_image&quot;:&quot;#2&quot;},     &quot;3&quot;:{&quot;status&quot;:&quot;space&quot;,&quot;name&quot;:&quot;#3&quot;, &quot;minimize_image&quot;:&quot;#3&quot;}, } <\/code><\/pre>\n<p>  <code>\u0446\u0438\u0444\u0440\u044b<\/code> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u044f\u0447\u0435\u0435\u043a.<\/p>\n<p>  <code>status<\/code> \u2014 \u044d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0443\u0441\u0442\u0430 \u044f\u0439\u0447\u0435\u0439\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u043f\u0443\u0441\u0442\u0430 \u0442\u043e \u00abspace\u00bb, \u0435\u0441\u043b\u0438 \u0436\u0435 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043c\u0435\u0442, \u0442\u043e \u0442\u0430\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430. <\/p>\n<p>  <code>name<\/code> \u2014 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u043c\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0433\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043c\u0435\u0442. <\/p>\n<p>  <code>minimize_image<\/code> \u2014 \u044d\u0442\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0435 \u0438\u0433\u0440\u043e\u043a\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435, \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c <code>CheckKeysObjects()<\/code>, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 <code>X<\/code> \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u043e\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0437\u0435\u043c\u043b\u044e, \u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>E<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>self.UseEat()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>self.UseEat()<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0447\u0435\u0439\u043a\u0430\u043c \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f, \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0435\u0434\u044b, \u0438 \u0435\u0441\u043b\u0438 \u0435\u0434\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0442\u043e \u043e\u043d\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f, \u0438 \u043a \u0433\u043e\u043b\u043e\u0434\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f 10 \u0435\u0434\u0438\u043d\u0438\u0446. \u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u0438\u0437 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>self.DestroyItem()<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u044f\u0447\u0435\u0439\u043a\u0438, \u0438 \u0432\u0441\u044f \u044f\u0447\u0435\u0439\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e \u00ab\u0434\u0435\u0444\u043e\u043b\u0442\u0443\u00bb \u043f\u0443\u0441\u0442\u043e\u0439 \u0438 \u0431\u0435\u0437 \u043d\u0438\u0447\u0435\u0433\u043e. <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">self.DestroyItem()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def DestroyItem(self,index_item: str):     item = self.PLAYER[&quot;inventory&quot;][index_item]     self.PLAYER[&quot;inventory&quot;][index_item] = self.PLAYER[&quot;default_inventory_item&quot;](index_item)     self.PLAYER[&quot;inventory_must_update&quot;] = True     return item<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">self.CheckKeysObjects()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def CheckKeysObjects(self):     self.WALK_LEFT_PLAYER = False     self.WALK_RIGHT_PLAYER = False     self.WALK_UP_PLAYER = False     self.WALK_DOWN_PLAYER = False     if key(&quot;a&quot;):         self.WALK_LEFT_PLAYER = True     elif key(&quot;d&quot;):         self.WALK_RIGHT_PLAYER = True     if key(&quot;w&quot;):         self.WALK_UP_PLAYER = True     elif key(&quot;s&quot;):         self.WALK_DOWN_PLAYER = True     if key(&quot;f&quot;):         self.KEY_F = True     else:         self.KEY_F= False     if key(&quot;e&quot;):         self.UseEat()<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">self.UseEat()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def UseEat(self):     for inventory_item in range(len(self.PLAYER[&quot;inventory&quot;])):         if self.PLAYER[&quot;inventory&quot;][str(inventory_item)][&quot;name&quot;] == &quot;meat&quot;:             if self.PLAYER[&quot;hungry&quot;] + self.ADD_HUNGRY_COUNT &lt; 100.0:                 self.PLAYER[&quot;hungry&quot;] += self.ADD_HUNGRY_COUNT                 self.DestroyItem(index_item=str(inventory_item)) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0440\u043e\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043d\u0430 \u0437\u0435\u043c\u043b\u044e.<\/p>\n<p>  \u0422\u0430\u043c \u0432\u043f\u0440\u043e\u0447\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 <code>X<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>self.QuitItem()<\/code>, \u0432 \u043d\u0435\u0439 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0446\u0438\u043a\u043b for \u043f\u043e \u0432\u0441\u0435\u043c \u044f\u0447\u0435\u0439\u043a\u0430\u043c \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044f, \u0438 \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 <code>[&quot;status&quot;]<\/code> \u043d\u0435 \u0440\u043e\u0432\u043d\u044f\u0435\u0442\u0441\u044f <code>&quot;space&quot;<\/code>, \u0442\u043e \u044d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0443 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u043d\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>self.DestroyItem()<\/code>, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b\u043b \u0432 \u044f\u0447\u0435\u0439\u043a\u0435, X \u0438 Y \u0441\u0442\u0430\u0432\u0438\u0442 \u0438\u0433\u0440\u043e\u043a\u0430, \u043a\u0430\u043a \u0431\u044b \u043e\u043d \u0431\u0440\u043e\u0441\u0438\u043b \u0435\u0433\u043e \u0432\u043e\u0437\u043b\u0435 \u0441\u0435\u0431\u044f. <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">self.Quititem()<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def QuitItem(self):     for inventory_item in range(len(self.PLAYER[&quot;inventory&quot;])):         if self.PLAYER[&quot;inventory&quot;][str(inventory_item)][&quot;status&quot;] != &quot;space&quot;:             self.CreateObject(                 img=self.PLAYER[&quot;inventory&quot;][str(inventory_item)][&quot;img&quot;],                 x=self.PLAYER[&quot;x&quot;],                 y=self.PLAYER[&quot;y&quot;],                 name=self.PLAYER[&quot;inventory&quot;][str(inventory_item)][&quot;name&quot;],                 data=self.PLAYER[&quot;inventory&quot;][str(inventory_item)][&quot;data&quot;],             )             self.DestroyItem(index_item=str(inventory_item))             break <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0418 \u0432\u043f\u0440\u043e\u0447\u0435\u043c \u0432\u0441\u0435, \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u044f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043b, \u0422.\u041a. \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043d\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0438\u0433\u0440\u044b, \u0445\u043e\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 (\u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c \u043f\u043e\u043b\u043e\u043d), \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0445\u043e\u0434\u044c\u0431\u044b, \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a, \u0438 \u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0447\u0438\u0445 \u0432\u0435\u0449\u0430\u0445.<\/p>\n<h2>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435?<\/h2>\n<p>  \u041d\u0435\u0442, \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0432 \u0438\u0433\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0438\u0441\u0430\u043b \u043d\u0430 Python,<br \/>  \u0421\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0433\u0440\u043e\u043a\u0430 \u0441 NPC \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e,<br \/>  \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u044e\u0436\u0435\u0442, \u0438 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u0438\u043f\u0430\u0441\u044b \u0434\u043b\u044f \u0438\u0433\u0440\u043e\u043a\u0430 \u0442\u0438\u043f\u0430 \u0431\u0440\u043e\u043d\u0438, \u0435\u0434\u044b. \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0430\u043c\u0438. <\/p>\n<h2>\u041f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0433\u0440\u0443<\/h2>\n<p>  \u0415\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 \u043c\u043e\u0435\u0433\u043e GitHub, \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c Python3, \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/pypi.org\/project\/keyboard\/\">keyboard<\/a>. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0444\u0430\u0439\u043b <code>main.py<\/code>.<\/p>\n<p>  <a href=\"https:\/\/github.com\/Always-prog\/Console-game\">\u0418\u0433\u0440\u0430<\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/516548\/\"> https:\/\/habr.com\/ru\/post\/516548\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516548\/\">\n<h2>\u041f\u0440\u0438\u0432\u0435\u0442! <\/h2>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043e\u043f\u0438\u0448\u0443 \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u0445, \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u0433\u0440\u0443 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0430 \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-308972","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308972"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308972\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}