{"id":337413,"date":"2022-08-23T09:00:42","date_gmt":"2022-08-23T09:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=337413"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=337413","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u00ab\u0434\u0435\u0431\u0430\u0436\u0438\u043b\u00bb \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u0438\u0433\u0440\u0443, \u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043a\u043e\u0435-\u0447\u0442\u043e \u0435\u0449\u0435<\/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>\u0420\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0439 &#171;\u0417\u043c\u0435\u0439\u043a\u0435&#187;, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 C# \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0430\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u044b \u0440\u044f\u0434\u043e\u043c \u0441 &#171;\u0435\u0434\u043e\u0439&#187; \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430\u0436\u043c\u0435\u0448\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043c\u0435\u0439\u043a\u043e\u0439, \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u0438 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/695\/0fe\/8df\/6950fe8df464511fdace2c4c1cdb838d.png\" alt=\"\u0420\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c @ \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430 &quot;\u0430&quot;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f\" title=\"\u0420\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c @ \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430 &quot;\u0430&quot;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f\" width=\"503\" height=\"606\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/695\/0fe\/8df\/6950fe8df464511fdace2c4c1cdb838d.png\"\/><figcaption>\u0420\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c @ \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430 &#171;\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u044d\u0442\u043e \u0434\u0435\u043b\u043e, \u0445\u043e\u0447\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0437 \u0434\u0430\u043b\u0435\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f, \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0441\u043a\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0441\u043d\u044f\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u0430 \u0413\u0438\u0442\u0425\u0430\u0431\u0435 \u0431\u0430\u0442\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0434\u043b\u044f <a href=\"https:\/\/github.com\/npocmaka\/batch.scripts\/blob\/master\/hybrids\/.net\/c\/screenCapture.bat\" rel=\"noopener noreferrer nofollow\">\u0441\u043d\u044f\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432<\/a>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0441\u0430\u043c \u043a\u0430\u043a \u0431\u044b \u0438 \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432\u043e\u0432\u0441\u0435 (\u0447\u0438\u0441\u0442\u043e \u0440\u0430\u0434\u0438 \u0445\u043e\u0431\u0431\u0438), \u0442\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0443\u0434\u043e\u043c \u0447\u0443\u0434\u043d\u044b\u043c &#8212; \u0432\u0435\u0434\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435, \u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0438\u0437 \u0431\u0430\u0442\u043d\u0438\u043a\u0430. \u041f\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u0442\u043e\u0442 \u0436\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u043d\u0435 \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435. \u0422\u043e\u0433\u0434\u0430 \u0436\u0435 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0435 \u0438\u0433\u0440\u044b, \u0438 \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u043b \u0442\u0430\u043a\u0438\u0435 \u0438\u0433\u0440\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0433\u0434\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0431\u044b\u043b\u0430 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u044d\u0442\u0430 \u0441\u0430\u043c\u0430\u044f &#171;\u0417\u043c\u0435\u0439\u043a\u0430&#187;. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u043d\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0433\u0440\u044b. \u041f\u043e\u0444\u0438\u043a\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430 Console.ReadLine(). \u0410 \u0432\u043e\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u0431\u0430\u0433\u043e\u043c \u0441 \u0431\u0443\u043a\u0432\u043e\u0439 &#171;\u0430&#187; \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u043b\u044c\u0448\u0435. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f14\/69e\/6e3\/f1469e6e35639330e2ee93b143318f2f.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e exe \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 cs \u0444\u0430\u0439\u043b\u043e\u0432\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e exe \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 cs \u0444\u0430\u0439\u043b\u043e\u0432\" width=\"251\" height=\"89\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f14\/69e\/6e3\/f1469e6e35639330e2ee93b143318f2f.png\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e exe \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 cs \u0444\u0430\u0439\u043b\u043e\u0432<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043e \u0447\u0435\u043c \u0440\u0435\u0447\u044c, \u0434\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/NikolayIT\/CSharpConsoleGames\/blob\/master\/Snake\/Program.cs\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 &#171;\u0417\u043c\u0435\u0439\u043a\u0438&#187;<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0433\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0435\u0434\u044b \u0438 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u043f\u043e\u0434\u0443\u043c\u0430\u0432 \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0445\u0438\u0442\u0440\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u0430&#187; \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439 \u0438 \u0435\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u042d\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438 \u044f \u0441\u0442\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u043e\u0442\u043e\u043c \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0437\u043c\u0435\u0439\u043a\u0438, \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e \u043a\u0443\u0434\u0430 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c. \u0414\u043e\u043b\u0433\u043e-\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b \u0438 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0441\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u043b \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0435 \u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0443, \u0430 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443, \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u043d\u044f\u043b \u0432 \u0447\u0435\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u0430\u043a\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u044f \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435. \u0415\u0434\u0430 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e Console.SetCursorPosition(food.col, food.row), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0435\u0439 \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u0435\u0434\u044b, \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u043f\u0440\u0430\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u0431\u0430\u0433, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0435\u0434\u044b \u043f\u0435\u0440\u0435\u0434 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0438, \u0438 \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0430\u0436\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0435\u0434\u044b \u043d\u0430 \u0431\u0443\u043a\u0432\u0443 &#171;\u0430&#187;. <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442, \u044f \u043e\u0431\u0435\u0440\u043d\u0443\u043b \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b, \u0447\u0442\u043e\u0431\u044b \u043e\u043a\u043d\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0435, \u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0438\u0433\u0440\u0430. \u0422\u0430\u043a \u0436\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0435\u0434\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0442\u0440\u0443\u0434\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0447\u0442\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0432\u043d\u043e, \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0432\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a (\u043c\u043e\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c):<\/p>\n<details class=\"spoiler\">\n<summary>\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0417\u043c\u0435\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using System.Threading;  namespace Snake {     struct Position     {         public int row;         public int col;         public Position(int row, int col)         {             this.row = row;             this.col = col;         }     }      class Program     {         static void Main(string[] args)         { while (true){             byte right = 0;             byte left = 1;             byte down = 2;             byte up = 3;             int lastFoodTime = 0;             int foodDissapearTime = 8000;             int negativePoints = 0;              Position[] directions = new Position[]             {                 new Position(0, 1), \/\/ right                 new Position(0, -1), \/\/ left                 new Position(1, 0), \/\/ down                 new Position(-1, 0), \/\/ up             };             double sleepTime = 100;             int direction = right;             Random randomNumbersGenerator = new Random();             Console.BufferHeight = Console.WindowHeight;             lastFoodTime = Environment.TickCount;              List&lt;Position> obstacles = new List&lt;Position>()             {                 new Position(12, 12),                 new Position(14, 20),                 new Position(7, 7),                 new Position(19, 19),                 new Position(6, 9),             };             foreach (Position obstacle in obstacles)             {                 Console.ForegroundColor = ConsoleColor.Cyan;                 Console.SetCursorPosition(obstacle.col, obstacle.row);                 Console.Write(\"X\");             }              Queue&lt;Position> snakeElements = new Queue&lt;Position>();             for (int i = 0; i &lt;= 5; i++)             {                 snakeElements.Enqueue(new Position(0, i));             }              Position food;             do             {                 food = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                     randomNumbersGenerator.Next(0, Console.WindowWidth));             }             while (snakeElements.Contains(food) || obstacles.Contains(food));             Console.SetCursorPosition(food.col, food.row);             Console.ForegroundColor = ConsoleColor.Yellow;             Console.Write(\"@\");              foreach (Position position in snakeElements)             {                 Console.SetCursorPosition(position.col, position.row);                 Console.ForegroundColor = ConsoleColor.DarkGray;                 Console.Write(\"*\");             }              while (true)             {                 negativePoints++; Console.SetCursorPosition(food.col, food.row); \/\/ \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b \"\u0430\" \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0435\u0434\u044b                 if (Console.KeyAvailable)                 {                     ConsoleKeyInfo userInput = Console.ReadKey();                     if (userInput.Key == ConsoleKey.LeftArrow)                     {                         if (direction != right) direction = left;                     }                     if (userInput.Key == ConsoleKey.RightArrow)                     {                         if (direction != left) direction = right;                     }                     if (userInput.Key == ConsoleKey.UpArrow)                     {                         if (direction != down) direction = up;                     }                     if (userInput.Key == ConsoleKey.DownArrow)                     {                         if (direction != up) direction = down;                     }                 }                  Position snakeHead = snakeElements.Last();                 Position nextDirection = directions[direction];                  Position snakeNewHead = new Position(snakeHead.row + nextDirection.row,                     snakeHead.col + nextDirection.col);                  if (snakeNewHead.col &lt; 0) snakeNewHead.col = Console.WindowWidth - 1;                 if (snakeNewHead.row &lt; 0) snakeNewHead.row = Console.WindowHeight - 1;                 if (snakeNewHead.row >= Console.WindowHeight) snakeNewHead.row = 0;                 if (snakeNewHead.col >= Console.WindowWidth) snakeNewHead.col = 0;                  if (snakeElements.Contains(snakeNewHead) || obstacles.Contains(snakeNewHead))                 { \/\/Console.Clear();                     Console.SetCursorPosition(0, 0);                     Console.ForegroundColor = ConsoleColor.Red;                     Console.WriteLine(\"Game over!\");                     int userPoints = (snakeElements.Count - 6) * 100 - negativePoints;                     \/\/if (userPoints &lt; 0) userPoints = 0;                     userPoints = Math.Max(userPoints, 0);                     Console.WriteLine(\"Your points are: {0}\", userPoints); Console.ReadLine(); \/\/ \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0430                     break;                 }                  Console.SetCursorPosition(snakeHead.col, snakeHead.row);                 Console.ForegroundColor = ConsoleColor.DarkGray;                 Console.Write(\"*\");                  snakeElements.Enqueue(snakeNewHead);                 Console.SetCursorPosition(snakeNewHead.col, snakeNewHead.row);                 Console.ForegroundColor = ConsoleColor.Gray;                 if (direction == right) Console.Write(\">\");                 if (direction == left) Console.Write(\"&lt;\");                 if (direction == up) Console.Write(\"^\");                 if (direction == down) Console.Write(\"V\");                   if (snakeNewHead.col == food.col &amp;&amp; snakeNewHead.row == food.row)                 {                     \/\/ feeding the snake                     do                     {                         food = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                             randomNumbersGenerator.Next(0, Console.WindowWidth));                     }                     while (snakeElements.Contains(food) || obstacles.Contains(food));                     lastFoodTime = Environment.TickCount;                     Console.SetCursorPosition(food.col, food.row);                     Console.ForegroundColor = ConsoleColor.Yellow;                     Console.Write(\"a\");                      sleepTime--;                      Position obstacle = new Position();                     do                     {                         obstacle = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                             randomNumbersGenerator.Next(0, Console.WindowWidth));                     }                     while (snakeElements.Contains(obstacle) ||                         obstacles.Contains(obstacle) ||                         (food.row == obstacle.row &amp;&amp; food.col == obstacle.row)); \/\/ \u0442\u0443\u0442 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0440\u0430\u0432\u043d\u043e                     obstacles.Add(obstacle);                     Console.SetCursorPosition(obstacle.col, obstacle.row);                     Console.ForegroundColor = ConsoleColor.Cyan;                     Console.Write(\"X\");                 }                 else                 {                     \/\/ moving...                     Position last = snakeElements.Dequeue();                     Console.SetCursorPosition(last.col, last.row);                     Console.Write(\" \");                 }                  if (Environment.TickCount - lastFoodTime >= foodDissapearTime)                 {                     negativePoints = negativePoints + 50;                     Console.SetCursorPosition(food.col, food.row);                     Console.Write(\" \");                     do                     {                         food = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                             randomNumbersGenerator.Next(0, Console.WindowWidth));                     }                     while (snakeElements.Contains(food) || obstacles.Contains(food));                     lastFoodTime = Environment.TickCount;                 }                  Console.SetCursorPosition(food.col, food.row);                 Console.ForegroundColor = ConsoleColor.Yellow;                 Console.Write(\"@\");                  sleepTime -= 0.01;                  Thread.Sleep((int)sleepTime);             }   Console.Clear(); }         }     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0431\u0430\u0433\u0438 \u043a\u043e\u0435-\u043a\u0430\u043a &#171;\u043f\u043e\u0447\u0438\u043d\u0438\u043b&#187;, \u043d\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0435\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e. \u0410 \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u0442\u0435\u0445 \u0438\u0433\u0440 \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u044f \u0441\u043a\u0430\u0447\u0430\u043b \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0438 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u0432\u0438\u0434\u0435\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c. \u0417\u0430\u0442\u043e \u0432\u043e\u0442 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u044d\u0442\u0438\u043c \u0434\u0435\u0431\u0430\u0433\u043e\u043c, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435, \u0433\u0434\u0435 \u0431\u044b\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u044d\u0442\u0438 \u0438\u0433\u0440\u044b, \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u043a\u043e\u0434\u0430\u043c\u0438. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0437\u043c\u0435\u0439\u043a\u0438 \u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c &#171;\u043c\u043e\u044f&#187; \u0437\u043c\u0435\u0439\u043a\u0430, \u0438 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a \u0432\u044b\u0448\u043b\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441 \u0442\u0430\u043a\u0438\u043c \u0431\u0430\u0433\u043e\u043c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u0438\u0433\u0440\u0443 \u043d\u0430 \u0413\u0438\u0442\u0425\u0430\u0431. \u0421\u043c\u043e\u0442\u0440\u044e \u0432\u0438\u0434\u0435\u043e, \u0438 \u0432\u0438\u0436\u0443, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u0430\u0433\u0430 \u0438 \u043d\u0435\u0442 \u0434\u0430\u0436\u0435. \u041c\u043d\u0435 \u0442\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435. \u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u043c\u0435\u043d\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0430. \u041d\u043e \u043d\u0435\u0442, \u0441 \u0431\u0430\u0442\u043d\u0438\u043a\u043e\u043c \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u0431\u0443\u043a\u0432\u0430 &#171;\u0430&#187; \u0431\u044b\u043b\u0430. \u041f\u043e\u0442\u043e\u043c \u044f \u0437\u0430\u043a\u0438\u043d\u0443\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443 \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u043d\u0435\u0439 Visual Studio, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0433\u0440\u0443 \u0438 \u0443\u0436\u0435 \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0431\u0430\u0433\u043e\u0432 (!). \u0425\u043c&#8230; \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435. \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u0438\u0437 \u0431\u0430\u0442\u043d\u0438\u043a\u0430 &#8212; \u0431\u0430\u0433\u0430 \u043d\u0435\u0442&#8230; \u0421\u0442\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043d\u043e \u043e\u0431\u043c\u0435\u043d\u044f\u0432 \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a\u0438 \u0441 \u043d\u043e\u0443\u0442\u0430 \u0438 \u0441 \u043a\u043e\u043c\u043f\u0430, \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u0447\u0442\u043e \u043d\u0430 \u043d\u043e\u0443\u0442\u0435 \u0431\u0430\u0433 \u0435\u0441\u0442\u044c, \u0430 \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u043d\u0435\u0442. \u0414\u043b\u044f \u043f\u0443\u0449\u0435\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u043e \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430, \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0443 \u043a \u043d\u0435\u043c\u0443, \u043d\u043e \u0431\u0430\u0433 \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0435&#8230; \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0438\u0433\u0440\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0447\u0435\u0440\u0435\u0437 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0438 \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u044b &#171;\u0430&#187;, \u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0441\u0442\u044c \u0438 \u043d\u0430 \u043d\u043e\u0443\u0442\u0435, \u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u043e\u0443\u0442\u0435. \u041a\u043e\u0440\u043e\u0447\u0435, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u043e\u0443\u0442\u0435, \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043d\u043e\u0443\u0442\u0431\u0443\u043a (\u043d\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c). <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u0444\u0438\u0433\u043d\u0435\u0439, \u0430 \u0435\u0449\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u0441 \u0432\u0430\u043c\u0438. \u0421\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u0438\u043d\u0430\u0439\u0442\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0432 \u0447\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/684064\/\"> https:\/\/habr.com\/ru\/post\/684064\/<\/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>\u0420\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0439 &#171;\u0417\u043c\u0435\u0439\u043a\u0435&#187;, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 C# \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0430\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u044b \u0440\u044f\u0434\u043e\u043c \u0441 &#171;\u0435\u0434\u043e\u0439&#187; \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430\u0436\u043c\u0435\u0448\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043c\u0435\u0439\u043a\u043e\u0439, \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u0438 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c:<\/p>\n<figure class=\"\"><figcaption>\u0420\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c @ \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430 &#171;\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u044d\u0442\u043e \u0434\u0435\u043b\u043e, \u0445\u043e\u0447\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0437 \u0434\u0430\u043b\u0435\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f, \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0438\u0441\u043a\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0441\u043d\u044f\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u0430 \u0413\u0438\u0442\u0425\u0430\u0431\u0435 \u0431\u0430\u0442\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0434\u043b\u044f <a href=\"https:\/\/github.com\/npocmaka\/batch.scripts\/blob\/master\/hybrids\/.net\/c\/screenCapture.bat\" rel=\"noopener noreferrer nofollow\">\u0441\u043d\u044f\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432<\/a>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0441\u0430\u043c \u043a\u0430\u043a \u0431\u044b \u0438 \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432\u043e\u0432\u0441\u0435 (\u0447\u0438\u0441\u0442\u043e \u0440\u0430\u0434\u0438 \u0445\u043e\u0431\u0431\u0438), \u0442\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0443\u0434\u043e\u043c \u0447\u0443\u0434\u043d\u044b\u043c &#8212; \u0432\u0435\u0434\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435, \u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0438\u0437 \u0431\u0430\u0442\u043d\u0438\u043a\u0430. \u041f\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u0442\u043e\u0442 \u0436\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u043d\u0435 \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435. \u0422\u043e\u0433\u0434\u0430 \u0436\u0435 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0435 \u0438\u0433\u0440\u044b, \u0438 \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u043b \u0442\u0430\u043a\u0438\u0435 \u0438\u0433\u0440\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0433\u0434\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0431\u044b\u043b\u0430 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u044d\u0442\u0430 \u0441\u0430\u043c\u0430\u044f &#171;\u0417\u043c\u0435\u0439\u043a\u0430&#187;. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u043d\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0433\u0440\u044b. \u041f\u043e\u0444\u0438\u043a\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430 Console.ReadLine(). \u0410 \u0432\u043e\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u0431\u0430\u0433\u043e\u043c \u0441 \u0431\u0443\u043a\u0432\u043e\u0439 &#171;\u0430&#187; \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u043b\u044c\u0448\u0435. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u044d\u043a\u0437\u0435\u0448\u043d\u0438\u043a\u0438.<\/p>\n<figure class=\"\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e exe \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 cs \u0444\u0430\u0439\u043b\u043e\u0432<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043e \u0447\u0435\u043c \u0440\u0435\u0447\u044c, \u0434\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/NikolayIT\/CSharpConsoleGames\/blob\/master\/Snake\/Program.cs\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 &#171;\u0417\u043c\u0435\u0439\u043a\u0438&#187;<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0433\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0435\u0434\u044b \u0438 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u043f\u043e\u0434\u0443\u043c\u0430\u0432 \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0445\u0438\u0442\u0440\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u0430&#187; \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439 \u0438 \u0435\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u042d\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438 \u044f \u0441\u0442\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u043e\u0442\u043e\u043c \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0437\u043c\u0435\u0439\u043a\u0438, \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e \u043a\u0443\u0434\u0430 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c. \u0414\u043e\u043b\u0433\u043e-\u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b \u0438 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0441\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u043b \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0435 \u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0443, \u0430 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443, \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u043d\u044f\u043b \u0432 \u0447\u0435\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u0430\u043a\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u044f \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435. \u0415\u0434\u0430 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e Console.SetCursorPosition(food.col, food.row), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0435\u0439 \u043a\u0443\u0440\u0441\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u0435\u0434\u044b, \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u043f\u0440\u0430\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u0431\u0430\u0433, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0435\u0434\u044b \u043f\u0435\u0440\u0435\u0434 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0438, \u0438 \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0430\u0436\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0435\u0434\u044b \u043d\u0430 \u0431\u0443\u043a\u0432\u0443 &#171;\u0430&#187;. <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442, \u044f \u043e\u0431\u0435\u0440\u043d\u0443\u043b \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b, \u0447\u0442\u043e\u0431\u044b \u043e\u043a\u043d\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0435, \u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0438\u0433\u0440\u0430. \u0422\u0430\u043a \u0436\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0435\u0434\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0442\u0440\u0443\u0434\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0447\u0442\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0432\u043d\u043e, \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0432\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a (\u043c\u043e\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c):<\/p>\n<details class=\"spoiler\">\n<summary>\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0417\u043c\u0435\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using System.Threading;  namespace Snake {     struct Position     {         public int row;         public int col;         public Position(int row, int col)         {             this.row = row;             this.col = col;         }     }      class Program     {         static void Main(string[] args)         { while (true){             byte right = 0;             byte left = 1;             byte down = 2;             byte up = 3;             int lastFoodTime = 0;             int foodDissapearTime = 8000;             int negativePoints = 0;              Position[] directions = new Position[]             {                 new Position(0, 1), \/\/ right                 new Position(0, -1), \/\/ left                 new Position(1, 0), \/\/ down                 new Position(-1, 0), \/\/ up             };             double sleepTime = 100;             int direction = right;             Random randomNumbersGenerator = new Random();             Console.BufferHeight = Console.WindowHeight;             lastFoodTime = Environment.TickCount;              List&lt;Position> obstacles = new List&lt;Position>()             {                 new Position(12, 12),                 new Position(14, 20),                 new Position(7, 7),                 new Position(19, 19),                 new Position(6, 9),             };             foreach (Position obstacle in obstacles)             {                 Console.ForegroundColor = ConsoleColor.Cyan;                 Console.SetCursorPosition(obstacle.col, obstacle.row);                 Console.Write(\"X\");             }              Queue&lt;Position> snakeElements = new Queue&lt;Position>();             for (int i = 0; i &lt;= 5; i++)             {                 snakeElements.Enqueue(new Position(0, i));             }              Position food;             do             {                 food = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                     randomNumbersGenerator.Next(0, Console.WindowWidth));             }             while (snakeElements.Contains(food) || obstacles.Contains(food));             Console.SetCursorPosition(food.col, food.row);             Console.ForegroundColor = ConsoleColor.Yellow;             Console.Write(\"@\");              foreach (Position position in snakeElements)             {                 Console.SetCursorPosition(position.col, position.row);                 Console.ForegroundColor = ConsoleColor.DarkGray;                 Console.Write(\"*\");             }              while (true)             {                 negativePoints++; Console.SetCursorPosition(food.col, food.row); \/\/ \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b \"\u0430\" \u0440\u044f\u0434\u043e\u043c \u0441 \u0435\u0434\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0435\u0434\u044b                 if (Console.KeyAvailable)                 {                     ConsoleKeyInfo userInput = Console.ReadKey();                     if (userInput.Key == ConsoleKey.LeftArrow)                     {                         if (direction != right) direction = left;                     }                     if (userInput.Key == ConsoleKey.RightArrow)                     {                         if (direction != left) direction = right;                     }                     if (userInput.Key == ConsoleKey.UpArrow)                     {                         if (direction != down) direction = up;                     }                     if (userInput.Key == ConsoleKey.DownArrow)                     {                         if (direction != up) direction = down;                     }                 }                  Position snakeHead = snakeElements.Last();                 Position nextDirection = directions[direction];                  Position snakeNewHead = new Position(snakeHead.row + nextDirection.row,                     snakeHead.col + nextDirection.col);                  if (snakeNewHead.col &lt; 0) snakeNewHead.col = Console.WindowWidth - 1;                 if (snakeNewHead.row &lt; 0) snakeNewHead.row = Console.WindowHeight - 1;                 if (snakeNewHead.row >= Console.WindowHeight) snakeNewHead.row = 0;                 if (snakeNewHead.col >= Console.WindowWidth) snakeNewHead.col = 0;                  if (snakeElements.Contains(snakeNewHead) || obstacles.Contains(snakeNewHead))                 { \/\/Console.Clear();                     Console.SetCursorPosition(0, 0);                     Console.ForegroundColor = ConsoleColor.Red;                     Console.WriteLine(\"Game over!\");                     int userPoints = (snakeElements.Count - 6) * 100 - negativePoints;                     \/\/if (userPoints &lt; 0) userPoints = 0;                     userPoints = Math.Max(userPoints, 0);                     Console.WriteLine(\"Your points are: {0}\", userPoints); Console.ReadLine(); \/\/ \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0448\u0430                     break;                 }                  Console.SetCursorPosition(snakeHead.col, snakeHead.row);                 Console.ForegroundColor = ConsoleColor.DarkGray;                 Console.Write(\"*\");                  snakeElements.Enqueue(snakeNewHead);                 Console.SetCursorPosition(snakeNewHead.col, snakeNewHead.row);                 Console.ForegroundColor = ConsoleColor.Gray;                 if (direction == right) Console.Write(\">\");                 if (direction == left) Console.Write(\"&lt;\");                 if (direction == up) Console.Write(\"^\");                 if (direction == down) Console.Write(\"V\");                   if (snakeNewHead.col == food.col &amp;&amp; snakeNewHead.row == food.row)                 {                     \/\/ feeding the snake                     do                     {                         food = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),                             randomNumbersGenerator.Next(0, Console.WindowWidth));                     }                     while (snakeElements.Contains(food) || obstacles.Contains(food));                     lastFoodTime = Environment.TickCount;                     Console.SetCursorPosition(food.col, food.row);                     Console.ForegroundColor = ConsoleColor.Yellow;                     Console.Write(\"a\");                      sleepTime--;                      Position obstacle = new Position();                     do                     {                         obstacle = new Position(randomNumbersGenerator.Next(0, Console.WindowHeight),<\/code><\/pre>\n<\/div>\n<\/details>\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-337413","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337413","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=337413"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337413\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}