{"id":384373,"date":"2024-06-29T05:27:57","date_gmt":"2024-06-29T05:27:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=384373"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=384373","title":{"rendered":"<span>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f 2D \u043c\u0438\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u043d\u0430 Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u0435\u043d\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b \u0430\u0432\u0442\u043e\u0440 YouTube \u043a\u0430\u043d\u0430\u043b\u0430 <a href=\"https:\/\/www.youtube.com\/@peaashmeter\" rel=\"noopener noreferrer nofollow\">PeaAshMeter<\/a>. \u0412 \u0441\u0432\u043e\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 2D \u043c\u0438\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442? \u041a\u0430\u043a\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u0431\u044b\u0432\u0430\u044e\u0442? \u041d\u0430 \u044d\u0442\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Python, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f! <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ff7\/a8d\/695\/ff7a8d695a2ab3deeb2ac949d11db722.jpg\" alt=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 2D \u043c\u0438\u0440\u0430.\" title=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 2D \u043c\u0438\u0440\u0430.\" width=\"1832\" height=\"474\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ff7\/a8d\/695\/ff7a8d695a2ab3deeb2ac949d11db722.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 2D \u043c\u0438\u0440\u0430.<\/figcaption><\/div>\n<\/figure>\n<h3>1. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442?  <\/h3>\n<p>\u041a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u00a0\u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u00a0x\u2011\u0441\u0442\u0440\u043e\u043a \u0438 y\u2011\u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 x \u0438 y \u0434\u0430\u0451\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438. \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u00a0\u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c\u00a0\u043b\u0438\u0448\u044c \u0432\u00a0\u0434\u0432\u0443\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u043c(1) \u0438\u043b\u0438\u00a0\u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u043c(0). \u0414\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u00a0\u2014 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0442\u0435\u043a\u0443\u0449\u0435\u0439. \u0420\u0430\u0434\u0438\u0443\u0441 \u0442\u0430\u043a\u043e\u0439 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c \u0432\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430\u0445, \u043a\u0430\u043a\u00a0\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430, \u0438\u043b\u0438\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443. \u041d\u0443\u0436\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043b\u0435\u0442\u043e\u043a \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0435, \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0438\u0442\u043a\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0430\u044f(0), \u0430\u00a0\u0432\u00a0\u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c 3\u00a0\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0441\u0435\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u044b(1), \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/126\/558\/6f3\/1265586f3b2428169ef4884f7a2ed7ea.png\" alt=\"\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0416\u0430\u0431\u0430\u00bb.\" title=\"\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0416\u0430\u0431\u0430\u00bb.\" width=\"1070\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/126\/558\/6f3\/1265586f3b2428169ef4884f7a2ed7ea.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0416\u0430\u0431\u0430\u00bb.<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0434\u0438\u043d \u0448\u0430\u0433 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043e\u0431\u0445\u043e\u0434 \u0432\u0441\u0435\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0438 \u0435\u0451 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043b\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0435\u0451 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435. \u041f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u0430\u0431\u043e\u0440 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2d\/c69\/778\/c2dc697786f2a473cfd17a535054ed82.gif\" alt=\"\u041f\u043b\u0430\u043d\u0435\u0440\u043d\u043e\u0435\u00a0\u0440\u0443\u0436\u044c\u0451\u00a0\u0413\u043e\u0441\u043f\u0435\u0440\u0430\u00a0\u0432 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435 \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb\" title=\"\u041f\u043b\u0430\u043d\u0435\u0440\u043d\u043e\u0435\u00a0\u0440\u0443\u0436\u044c\u0451\u00a0\u0413\u043e\u0441\u043f\u0435\u0440\u0430\u00a0\u0432 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435 \u00ab\u0416\u0438\u0437\u043d\u044c\u00bb\" width=\"250\" height=\"180\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2d\/c69\/778\/c2dc697786f2a473cfd17a535054ed82.gif\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%BB%D0%B0%D0%BD%D0%B5%D1%80_(%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F_%D0%BA%D0%BB%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u041f\u043b\u0430\u043d\u0435\u0440\u043d\u043e\u0435<\/a>\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D1%83%D0%B6%D1%8C%D1%91_(%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F_%D0%BA%D0%BB%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u0436\u044c\u0451<\/a>\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D0%BE%D1%81%D0%BF%D0%B5%D1%80,_%D0%91%D0%B8%D0%BB%D0%BB\" rel=\"noopener noreferrer nofollow\">\u0413\u043e\u0441\u043f\u0435\u0440\u0430<\/a>\u00a0\u0432 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435 \u00ab<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%96%D0%B8%D0%B7%D0%BD%D1%8C_(%D0%B8%D0%B3%D1%80%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0437\u043d\u044c<\/a>\u00bb<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u044d\u0442\u043e\u0439 \u0432\u0432\u043e\u0434\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>2. \u0425\u0430\u043e\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.pygame.org\/news\" rel=\"noopener noreferrer nofollow\">PyGame<\/a>, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0430 \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043c \u044d\u0442\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c. \u041d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f PyGame. \u0412 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 App \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043d\u0430, \u0442\u0430\u0439\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441 <strong>Biomes<\/strong>, \u0432 \u043d\u0451\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0438\u043e\u043c\u0430\u043c\u0438. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <strong>run<\/strong> \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0438 \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a <strong>fps<\/strong>. \u0415\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <strong>settings<\/strong>, \u0432 \u043d\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0435\u0440\u0435\u0437 \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044c \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430.\u00a0<\/p>\n<pre><code class=\"python\">class App:    def __init__(self):        self.screen = pg.display.set_mode(settings.RES)        self.clock = pg.time.Clock()        self.biomes = bm.Biomes(app=self, pg=pg)     def run(self):        while True:            for event in pg.event.get():                if event.type == pg.QUIT:                    pg.quit()                elif event.type == pg.KEYDOWN:                    if event.key == pg.K_SPACE:                        self.biomes.main_render_biomes()             self.clock.tick(settings.FPS)            pg.display.set_caption(f'FPS: {self.clock.get_fps()}')   if __name__ == '__main__':    app = App()    app.run()<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0433\u043e\u0442\u043e\u0432, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u043e\u043c \u043a\u0430\u0434\u0440\u043e\u0432. \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u0430\u0434\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0442\u0438\u043f\u044b \u0431\u0438\u043e\u043c\u043e\u0432 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0437 <strong>enum<\/strong> \u043d\u0430\u043c \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c, \u0432 \u043d\u0435\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0431\u0438\u043e\u043c\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0423 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 5 \u0431\u0438\u043e\u043c\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0441\u0443\u0448\u0430, \u043c\u043e\u0440\u0435, \u043f\u0435\u0441\u043e\u043a, \u043f\u043e\u0431\u0435\u0440\u0435\u0436\u044c\u0435, \u043b\u0435\u0441.<\/p>\n<pre><code class=\"python\">class BiomesType(Enum):    LAND = 1    SEA = 2    SAND = 3    SEA_SHORE = 4    WOODS = 5<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f, \u0438\u0445 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u044f \u0432\u044b\u0431\u0440\u0430\u043b 50%. \u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0441\u0442\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 300, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 600 \u043d\u0430 600 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u043a\u0430\u0436\u0434\u044b\u0439 \u201c\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u201d \u0431\u0438\u043e\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0443 2 \u043d\u0430 2 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u044f, \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0442\u043e\u0447\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u201c\u043f\u0438\u043a\u0441\u0435\u043b\u044f\u201d \u0431\u0438\u043e\u043c\u0430.   <\/p>\n<pre><code class=\"python\">def create_start_matrix(self):    rows = settings.Rows    cols = settings.Columns    matrix = [[0] * cols for _ in range(rows)]     for i in range(rows):        for j in range(cols):            r = random.randint(1, 2)            matrix[i][j] = BiomesType.SEA if (r == 1) else BiomesType.LAND            self.paint_pixel_element(matrix[i][j], i, j)    self.pg.display.update()     return matrix<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443. \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043d\u043e\u0441\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0445\u043e\u043b\u0441\u0442. \u042d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <strong>paint_pixel_element<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0438\u043f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u0438\u043e\u043c\u0430 \u0438 \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b. \u041f\u043e\u0441\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0431\u0438\u043e\u043c\u0430 \u043e\u043d \u0437\u0430\u0434\u0430\u0435\u0442 \u0446\u0432\u0435\u0442 \u0438 \u0440\u0438\u0441\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0438 \u0435\u0433\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"python\">def paint_pixel_element(self, biome, x, y):    if biome == BiomesType.LAND:        color = settings.COLOR_LAND    elif biome == BiomesType.SEA:        color = settings.COLOR_SEA    elif biome == BiomesType.SAND:        color = settings.COLOR_SAND    elif biome == BiomesType.SEA_SHORE:        color = settings.COLOR_SEA_SHORE    elif biome == BiomesType.WOODS:        color = settings.COLOR_WOODS    self.pg.draw.rect(self.app.screen, color,                      (x * settings.basicX, y * settings.basicY, settings.basicX, settings.basicY)) <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <strong>display.update() <\/strong>\u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u043b\u0441\u0442\u0430, \u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/78e\/2a3\/a20\/78e2a3a20c55c3e5fbeb0693518b5a07.jpg\" alt=\"\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).\" title=\"\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).\" width=\"600\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/78e\/2a3\/a20\/78e2a3a20c55c3e5fbeb0693518b5a07.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).<\/figcaption><\/div>\n<\/figure>\n<h3>3. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0437 \u0445\u0430\u043e\u0441\u0430<\/h3>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043e\u0441\u0442\u0440\u043e\u0432\u0430 \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430, \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u201c\u0414\u0435\u043d\u044c \u0438 \u043d\u043e\u0447\u044c\u201d(<strong>B3678\/S34678)<\/strong>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>\u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c<\/em>. \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0441\u0438\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c.\u00a0<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0438 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0435\u0449\u0451 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0443\u0433\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u044d\u0442\u043e \u0441\u0443\u0448\u0430, \u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0440\u044f \u0440\u0430\u0432\u0435\u043d 3, 6, 7, 8 \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u043d\u0430 \u043c\u043e\u0440\u0435 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0434\u043b\u044f \u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0440\u044f. \u0420\u0430\u0434\u0438\u0443\u0441 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043f\u0440\u0438\u043c\u0435\u043c \u0437\u0430 1 \u043a\u043b\u0435\u0442\u043a\u0443. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/2d7\/bc1\/92a\/2d7bc192a45e0d8d710b395043b4b025.jpg\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.\" width=\"900\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2d7\/bc1\/92a\/2d7bc192a45e0d8d710b395043b4b025.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">def next_generation_lands(self):    for x in range(len(self.matrix)):        for y in range(len(self.matrix[x])):            counter_sea = 0            counter_land = 0             if (x - 1) >= 0:                if self.matrix[x - 1][y] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0:                if self.matrix[x][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1:                if self.matrix[x][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0 and (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1 and (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0 and (x - 1) >= 0:                if self.matrix[x - 1][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1 and (x - 1) >= 0:                if self.matrix[x - 1][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if self.matrix[x][y] == BiomesType.LAND:                if counter_sea == 3 or counter_sea == 6 \\                        or counter_sea == 7 or counter_sea == 8:                    self.matrix[x][y] = BiomesType.SEA                    self.paint_pixel_element(self.matrix[x][y], x, y)             if self.matrix[x][y] == BiomesType.SEA:                if counter_land == 3 or counter_land == 6 \\                        or counter_land == 7 or counter_land == 8:                    self.matrix[x][y] = BiomesType.LAND                    self.paint_pixel_element(self.matrix[x][y], x, y)    self.pg.display.update() <\/code><\/pre>\n<p>\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 200 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0448\u0443\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u043f\u0435\u043b\u0430\u0433 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043b\u043e\u0435\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b6b\/878\/dfb\/b6b878dfbf44e5702e61b6abc7097d83.jpg\" alt=\"\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).\" title=\"\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).\" width=\"600\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b6b\/878\/dfb\/b6b878dfbf44e5702e61b6abc7097d83.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).<\/figcaption><\/div>\n<\/figure>\n<h3>4. \u041f\u043b\u044f\u0436 \u0438 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0441\u043e\u0447\u043d\u043e\u0433\u043e \u0431\u0435\u0440\u0435\u0433\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0432\u043e\u0434\u043a\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0441\u0442\u0440\u043e\u0432\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435: \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u0441\u0443\u0448\u0430, \u0438 \u043e\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0435\u0442\u043a\u0430\u043c\u0438 \u043c\u043e\u0440\u0435 \u0438 \u0441\u0443\u0448\u0435\u0439, \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0435 \u043d\u0430 \u043f\u0435\u0441\u043e\u043a.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/eeb\/29e\/087\/eeb29e0870b454469f077fb69cb0793c.jpg\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.\" width=\"900\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eeb\/29e\/087\/eeb29e0870b454469f077fb69cb0793c.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0443\u0440 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0441\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0443\u0448\u0438 \u0432 \u043f\u0435\u0441\u043e\u043a. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0443\u0448\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 5 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043a\u043b\u0435\u0442\u043e\u043a \u043f\u0435\u0441\u043a\u0430, \u0442\u043e \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 2% \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u043d\u0430 \u043f\u0435\u0441\u043e\u043a. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0439\u0434\u0451\u0442 100 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e93\/da5\/f37\/e93da5f37d0a4f0360fa84f7909b66f9.jpg\" alt=\"\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u0441\u0443\u0448\u0438 \u043f\u043b\u044f\u0436\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).\" title=\"\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u0441\u0443\u0448\u0438 \u043f\u043b\u044f\u0436\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).\" width=\"600\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e93\/da5\/f37\/e93da5f37d0a4f0360fa84f7909b66f9.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u0441\u0443\u0448\u0438 \u043f\u043b\u044f\u0436\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043b\u0438\u0448\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043a\u043b\u0435\u0442\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0441\u043a\u043e\u043c \u0438 \u043c\u043e\u0440\u0435\u043c. \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043e\u0431\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0442\u0443\u0440, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 2%.   <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/724\/54c\/d6c\/72454cd6ccd274db77df86aa67d09231.jpg\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u044f \u0438 \u043c\u043e\u0440\u044f.\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u044f \u0438 \u043c\u043e\u0440\u044f.\" width=\"900\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/724\/54c\/d6c\/72454cd6ccd274db77df86aa67d09231.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u044f \u0438 \u043c\u043e\u0440\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0441\u043b\u0435 100 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/78a\/607\/59c\/78a60759c98957c49fc5681b7eddb65c.jpg\" alt=\"\u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u043f\u043b\u044f\u0436\u0430 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).\" title=\"\u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u043f\u043b\u044f\u0436\u0430 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).\" width=\"600\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/78a\/607\/59c\/78a60759c98957c49fc5681b7eddb65c.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043b\u043e\u0439 (\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u043f\u043b\u044f\u0436\u0430 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435\u043c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e).<\/figcaption><\/div>\n<\/figure>\n<h3>5. \u041b\u0435\u0441<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u0443\u0441\u0442\u043e\u0439 \u043b\u0435\u0441. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u0435\u043c \u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c \u201c\u0414\u0435\u043d\u044c \u0438 \u043d\u043e\u0447\u044c\u201d(<strong>B3678\/S34678)<\/strong>, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u0435\u0441\u0430 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u043a\u0430\u043a \u0438 \u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f (\u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f). \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u0435\u0441\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0445 \u0441\u0443\u0448\u0438.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6aa\/5c5\/765\/6aa5c5765c77abc2b5d10c5ae51f5242.jpg\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430.\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430.\" width=\"900\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6aa\/5c5\/765\/6aa5c5765c77abc2b5d10c5ae51f5242.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043b\u0435\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435, \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 30. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043b\u0435\u0441\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/aad\/63a\/72b\/aad63a72bdf739edcc646c7fcda32c0e.jpg\" alt=\"\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430).\" title=\"\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430).\" width=\"600\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aad\/63a\/72b\/aad63a72bdf739edcc646c7fcda32c0e.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u0433\u0443\u0441\u0442\u043e\u0433\u043e \u043b\u0435\u0441\u0430).<\/figcaption><\/div>\n<\/figure>\n<h3>6. PyGame \u0432\u043c\u0435\u0441\u0442\u043e Kivy<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b <a href=\"https:\/\/www.pygame.org\/news\" rel=\"noopener noreferrer nofollow\">PyGame<\/a>. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"https:\/\/kivy.org\" rel=\"noopener noreferrer nofollow\">Kivy<\/a>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u043d\u0430 \u0445\u043e\u043b\u0441\u0442\u0435, \u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439. \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0447\u0451\u0442\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u0447\u0442\u043e \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Kivy \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e UI. \u0412 PyGame \u0435\u0441\u0442\u044c \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 (\u043e\u043d\u0430 \u0440\u0438\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b), \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432 \u0440\u0435\u0430\u043b \u0442\u0430\u0439\u043c\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u043a\u0430\u0440\u0442\u044b. \u0415\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u043f\u043b\u044e\u0441\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044c \u043a\u0430\u0434\u0440\u043e\u0432, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e \u0441\u0443\u0434\u0438\u0442\u044c \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u0441\u0451 \u044d\u0442\u043e \u0432 \u0441\u0443\u043c\u043c\u0435 \u0441 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c PyGame.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u0430\u0440\u0442\u044b. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 NumPy, Numba \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435.<\/p>\n<\/li>\n<\/ul>\n<h2>7. \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f 2D \u043c\u0438\u0440\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445. \u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430, \u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0432 \u043f\u043b\u0430\u043d\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_Diamond-Square\" rel=\"noopener noreferrer nofollow\">diamond square<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A8%D1%83%D0%BC_%D0%9F%D0%B5%D1%80%D0%BB%D0%B8%D0%BD%D0%B0\" rel=\"noopener noreferrer nofollow\">\u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430<\/a>, \u044d\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0435\u0431\u044f \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438 \u0438 \u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0443 \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439. \u0418 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e, \u0435\u0441\u043b\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430!\u00a0<br \/><a href=\"https:\/\/github.com\/Kooo9058\/generator-biomes-2D-new\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/a><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/891\/9c2\/34c\/8919c234cfee0afb20b2c055fd15fc68.gif\" alt=\"\u0410\u043d\u0438\u043c\u0430\u0448\u043a\u0430 \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a.\" title=\"\u0410\u043d\u0438\u043c\u0430\u0448\u043a\u0430 \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a.\" width=\"400\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/891\/9c2\/34c\/8919c234cfee0afb20b2c055fd15fc68.gif\"\/><\/p>\n<div><figcaption>\u0410\u043d\u0438\u043c\u0430\u0448\u043a\u0430 \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a.<\/figcaption><\/div>\n<\/figure>\n<h3>8. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/youtu.be\/YtXvqJzKL70\" rel=\"noopener noreferrer nofollow\">\u0412\u0438\u0434\u0435\u043e\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.alanzucconi.com\/2022\/06\/05\/minecraft-world-generation\/\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441 \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 Minecraft<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BB%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82\" rel=\"noopener noreferrer nofollow\">\u0412\u0438\u043a\u0438 \u041a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/716342\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u0435\u0441\u043d\u044b\u0445 \u043f\u043e\u0436\u0430\u0440\u043e\u0432: \u0442\u0435\u043e\u0440\u0438\u044f, \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/718620\/\" rel=\"noopener noreferrer nofollow\">10 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0440\u0435\u043b\u0438\u0449\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/311196\/\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u0442\u0432\u0430 \u0434\u0440\u043e\u0438\u0434\u043e\u0432 \u0438 \u0434\u0436\u0435\u0434\u0430\u0435\u0432 \u043d\u0430 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/youtu.be\/_tgsAaJoOlU\" rel=\"noopener noreferrer nofollow\">\u0421\u044b\u0433\u0440\u0430\u0435\u043c \u0432 &#171;\u0416\u0438\u0437\u043d\u044c&#187;! \u041a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043d\u0430 Python [ Pygame ]<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/peaashmeter.github.io\/ceditor\/#\/\" rel=\"noopener noreferrer nofollow\">\u041e\u043d\u043b\u0430\u0439\u043d \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/721956\/\"> https:\/\/habr.com\/ru\/articles\/721956\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u0435\u043d\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b \u0430\u0432\u0442\u043e\u0440 YouTube \u043a\u0430\u043d\u0430\u043b\u0430 <a href=\"https:\/\/www.youtube.com\/@peaashmeter\" rel=\"noopener noreferrer nofollow\">PeaAshMeter<\/a>. \u0412 \u0441\u0432\u043e\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 2D \u043c\u0438\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442? \u041a\u0430\u043a\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u0431\u044b\u0432\u0430\u044e\u0442? \u041d\u0430 \u044d\u0442\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Python, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f! <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 2D \u043c\u0438\u0440\u0430.<\/figcaption><\/div>\n<\/figure>\n<h3>1. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442?  <\/h3>\n<p>\u041a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u00a0\u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u00a0x\u2011\u0441\u0442\u0440\u043e\u043a \u0438 y\u2011\u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 x \u0438 y \u0434\u0430\u0451\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438. \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u00a0\u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c\u00a0\u043b\u0438\u0448\u044c \u0432\u00a0\u0434\u0432\u0443\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u043c(1) \u0438\u043b\u0438\u00a0\u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u043c(0). \u0414\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u00a0\u2014 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0442\u0435\u043a\u0443\u0449\u0435\u0439. \u0420\u0430\u0434\u0438\u0443\u0441 \u0442\u0430\u043a\u043e\u0439 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c \u0432\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430\u0445, \u043a\u0430\u043a\u00a0\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430, \u0438\u043b\u0438\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443. \u041d\u0443\u0436\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043b\u0435\u0442\u043e\u043a \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0435, \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0438\u0442\u043a\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0430\u044f(0), \u0430\u00a0\u0432\u00a0\u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c 3\u00a0\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0441\u0435\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u044b(1), \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0416\u0430\u0431\u0430\u00bb.<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0434\u0438\u043d \u0448\u0430\u0433 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043e\u0431\u0445\u043e\u0434 \u0432\u0441\u0435\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0438 \u0435\u0451 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043b\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0435\u0451 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435. \u041f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u0430\u0431\u043e\u0440 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n<figure class=\"\">\n<div><figcaption><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%BB%D0%B0%D0%BD%D0%B5%D1%80_(%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F_%D0%BA%D0%BB%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u041f\u043b\u0430\u043d\u0435\u0440\u043d\u043e\u0435<\/a>\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D1%83%D0%B6%D1%8C%D1%91_(%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F_%D0%BA%D0%BB%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u0440\u0443\u0436\u044c\u0451<\/a>\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D0%BE%D1%81%D0%BF%D0%B5%D1%80,_%D0%91%D0%B8%D0%BB%D0%BB\" rel=\"noopener noreferrer nofollow\">\u0413\u043e\u0441\u043f\u0435\u0440\u0430<\/a>\u00a0\u0432 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435 \u00ab<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%96%D0%B8%D0%B7%D0%BD%D1%8C_(%D0%B8%D0%B3%D1%80%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0437\u043d\u044c<\/a>\u00bb<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u044d\u0442\u043e\u0439 \u0432\u0432\u043e\u0434\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>2. \u0425\u0430\u043e\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.pygame.org\/news\" rel=\"noopener noreferrer nofollow\">PyGame<\/a>, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0430 \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043c \u044d\u0442\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c. \u041d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f PyGame. \u0412 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 App \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043d\u0430, \u0442\u0430\u0439\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441 <strong>Biomes<\/strong>, \u0432 \u043d\u0451\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0438\u043e\u043c\u0430\u043c\u0438. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <strong>run<\/strong> \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0438 \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a <strong>fps<\/strong>. \u0415\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <strong>settings<\/strong>, \u0432 \u043d\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0435\u0440\u0435\u0437 \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044c \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430.\u00a0<\/p>\n<pre><code class=\"python\">class App:    def __init__(self):        self.screen = pg.display.set_mode(settings.RES)        self.clock = pg.time.Clock()        self.biomes = bm.Biomes(app=self, pg=pg)     def run(self):        while True:            for event in pg.event.get():                if event.type == pg.QUIT:                    pg.quit()                elif event.type == pg.KEYDOWN:                    if event.key == pg.K_SPACE:                        self.biomes.main_render_biomes()             self.clock.tick(settings.FPS)            pg.display.set_caption(f'FPS: {self.clock.get_fps()}')   if __name__ == '__main__':    app = App()    app.run()<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0433\u043e\u0442\u043e\u0432, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u043e\u043c \u043a\u0430\u0434\u0440\u043e\u0432. \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u0430\u0434\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0442\u0438\u043f\u044b \u0431\u0438\u043e\u043c\u043e\u0432 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0437 <strong>enum<\/strong> \u043d\u0430\u043c \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c, \u0432 \u043d\u0435\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0431\u0438\u043e\u043c\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0423 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 5 \u0431\u0438\u043e\u043c\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0441\u0443\u0448\u0430, \u043c\u043e\u0440\u0435, \u043f\u0435\u0441\u043e\u043a, \u043f\u043e\u0431\u0435\u0440\u0435\u0436\u044c\u0435, \u043b\u0435\u0441.<\/p>\n<pre><code class=\"python\">class BiomesType(Enum):    LAND = 1    SEA = 2    SAND = 3    SEA_SHORE = 4    WOODS = 5<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f, \u0438\u0445 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u044f \u0432\u044b\u0431\u0440\u0430\u043b 50%. \u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0441\u0442\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 300, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 600 \u043d\u0430 600 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u043a\u0430\u0436\u0434\u044b\u0439 \u201c\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u201d \u0431\u0438\u043e\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0443 2 \u043d\u0430 2 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u044f, \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0442\u043e\u0447\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u201c\u043f\u0438\u043a\u0441\u0435\u043b\u044f\u201d \u0431\u0438\u043e\u043c\u0430.   <\/p>\n<pre><code class=\"python\">def create_start_matrix(self):    rows = settings.Rows    cols = settings.Columns    matrix = [[0] * cols for _ in range(rows)]     for i in range(rows):        for j in range(cols):            r = random.randint(1, 2)            matrix[i][j] = BiomesType.SEA if (r == 1) else BiomesType.LAND            self.paint_pixel_element(matrix[i][j], i, j)    self.pg.display.update()     return matrix<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443. \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043d\u043e\u0441\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0445\u043e\u043b\u0441\u0442. \u042d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <strong>paint_pixel_element<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0438\u043f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u0438\u043e\u043c\u0430 \u0438 \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b. \u041f\u043e\u0441\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0431\u0438\u043e\u043c\u0430 \u043e\u043d \u0437\u0430\u0434\u0430\u0435\u0442 \u0446\u0432\u0435\u0442 \u0438 \u0440\u0438\u0441\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0438 \u0435\u0433\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"python\">def paint_pixel_element(self, biome, x, y):    if biome == BiomesType.LAND:        color = settings.COLOR_LAND    elif biome == BiomesType.SEA:        color = settings.COLOR_SEA    elif biome == BiomesType.SAND:        color = settings.COLOR_SAND    elif biome == BiomesType.SEA_SHORE:        color = settings.COLOR_SEA_SHORE    elif biome == BiomesType.WOODS:        color = settings.COLOR_WOODS    self.pg.draw.rect(self.app.screen, color,                      (x * settings.basicX, y * settings.basicY, settings.basicX, settings.basicY)) <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <strong>display.update() <\/strong>\u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u043b\u0441\u0442\u0430, \u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).<\/figcaption><\/div>\n<\/figure>\n<h3>3. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0437 \u0445\u0430\u043e\u0441\u0430<\/h3>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043b\u0435\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043e\u0441\u0442\u0440\u043e\u0432\u0430 \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430, \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u201c\u0414\u0435\u043d\u044c \u0438 \u043d\u043e\u0447\u044c\u201d(<strong>B3678\/S34678)<\/strong>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>\u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c<\/em>. \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u043e\u0441\u0438\u0442\u044c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c.\u00a0<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0438 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0435\u0449\u0451 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0443\u0433\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u044d\u0442\u043e \u0441\u0443\u0448\u0430, \u0430 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0440\u044f \u0440\u0430\u0432\u0435\u043d 3, 6, 7, 8 \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u043d\u0430 \u043c\u043e\u0440\u0435 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0434\u043b\u044f \u043a\u043b\u0435\u0442\u043e\u043a \u043c\u043e\u0440\u044f. \u0420\u0430\u0434\u0438\u0443\u0441 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043f\u0440\u0438\u043c\u0435\u043c \u0437\u0430 1 \u043a\u043b\u0435\u0442\u043a\u0443. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">def next_generation_lands(self):    for x in range(len(self.matrix)):        for y in range(len(self.matrix[x])):            counter_sea = 0            counter_land = 0             if (x - 1) >= 0:                if self.matrix[x - 1][y] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0:                if self.matrix[x][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1:                if self.matrix[x][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0 and (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1 and (x + 1) &lt;= settings.Columns - 1:                if self.matrix[x + 1][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y - 1) >= 0 and (x - 1) >= 0:                if self.matrix[x - 1][y - 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if (y + 1) &lt;= settings.Rows - 1 and (x - 1) >= 0:                if self.matrix[x - 1][y + 1] == BiomesType.SEA:                    counter_sea += 1                else:                    counter_land += 1             if self.matrix[x][y] == BiomesType.LAND:                if counter_sea == 3 or counter_sea == 6 \\                        or counter_sea == 7 or counter_sea == 8:                    self.matrix[x][y] = BiomesType.SEA                    self.paint_pixel_element(self.matrix[x][y], x, y)             if self.matrix[x][y] == BiomesType.SEA:                if counter_land == 3 or counter_land == 6 \\                        or counter_land == 7 or counter_land == 8:                    self.matrix[x][y] = BiomesType.LAND                    self.paint_pixel_element(self.matrix[x][y], x, y)    self.pg.display.update() <\/code><\/pre>\n<p>\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 200 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0448\u0443\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u043f\u0435\u043b\u0430\u0433 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043b\u043e\u0435\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u043e\u0439 (\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f).<\/figcaption><\/div>\n<\/figure>\n<h3>4. \u041f\u043b\u044f\u0436 \u0438 \u043c\u0435\u043b\u043a\u043e\u0432\u043e\u0434\u044c\u0435<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0441\u043e\u0447\u043d\u043e\u0433\u043e \u0431\u0435\u0440\u0435\u0433\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0432\u043e\u0434\u043a\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0441\u0442\u0440\u043e\u0432\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435: \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u0441\u0443\u0448\u0430, \u0438 \u043e\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0435\u0442\u043a\u0430\u043c\u0438 \u043c\u043e\u0440\u0435 \u0438 \u0441\u0443\u0448\u0435\u0439, \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0435 \u043d\u0430 \u043f\u0435\u0441\u043e\u043a.  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u044f\u0436\u0430, \u0441\u0443\u0448\u0438 \u0438 \u043c\u043e\u0440\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-384373","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/384373","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=384373"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/384373\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=384373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=384373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=384373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}