{"id":269282,"date":"2015-11-30T11:50:03","date_gmt":"2015-11-30T08:50:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269282"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269282","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u0433\u0440\u0443 \u043f\u0440\u043e \u0446\u0438\u0444\u0440\u044b \u043f\u043e\u0434 Android"},"content":{"rendered":"<p>       \u041a\u043e\u0433\u0434\u0430 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (3 \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434), \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441 \u0443\u0442\u0440\u0430 \u0434\u043e \u0432\u0435\u0447\u0435\u0440\u0430 \u0441\u0438\u0434\u0435\u0442\u044c \u0437\u0430 \u043a\u043d\u0438\u0433\u0430\u043c\u0438 \u0438\u043b\u0438 \u043a\u0443\u0440\u0441\u0430\u043c\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0435, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441 \u0443\u0442\u0440\u0430 \u0434\u043e \u0443\u0442\u0440\u0430. <\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014\u00a0\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u0433\u0440\u0443 \u0441 \u0431\u043e\u0442\u043e\u043c. \u0418\u0433\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"420\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/SOnbB5cw-eg?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  <i>*\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u0418\u0418.<\/i><\/p>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e \u043d\u0430 \u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f\u044b.  <\/p>\n<ol>\n<li>\u041d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434.<br \/>  \u0412\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0432 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0441 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0410 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 <a href=\"https:\/\/github.com\/Liverm0r\/PlusMinus\">\u0433\u0438\u0442\u0445\u0430\u0431\u0430<\/a>. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/li>\n<li>\u0423\u0436\u0435 \u0443\u043c\u0435\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438.<br \/>  \u0412\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443. \u042f \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0435\u043d\u043a\u0443 \u043f\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0433\u0440\u044b \u0438 ui-\u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439, \u0432\u0430\u043c \u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0438\u0433\u0440\u044b (2 \u043d\u0430 2, \u043e\u043d\u043b\u0430\u0439\u043d \u0438 \u0442.\u043f.), \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u043e\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0440\u043e\u0432\u043d\u0438 \u0438 \u0442.\u0434. <\/li>\n<li>\u041e\u043f\u044b\u0442\u043d\u044b\u0435.<br \/>  \u0412\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0434 \u0418\u0418 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u0422\u0430\u043a \u0436\u0435 \u044f \u0431\u044b\u043b \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u0432\u0430\u0441 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u2014 \u0443\u0432\u0435\u0440\u0435\u043d, \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e.<\/li>\n<\/ol>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4><b>\u041f\u0440\u0435\u043b\u044e\u0434\u0438\u044f<\/b><\/h4>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 (\u0447\u0442\u043e\u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u043f\u0443\u0441\u0442\u0438\u0442\u044c) \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u0432\u0441\u0435 \u0448\u0430\u0433\u0438. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0445\u043e\u0440\u043e\u0448\u0435\u043c \u0442\u043e\u043d\u0435, \u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0438 \u043f\u043b\u043e\u0445\u0438\u0435 \u043c\u0435\u0441\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u0448\u0435\u043b \u0440\u0430\u0434\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043c\u0430.<\/p>\n<p>  \u0411\u0443\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u043b\u0430\u043d\u0443:  <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/li>\n<li>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0431\u043e\u0442\u0430<\/li>\n<li>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0438\u0433\u0440\u044b<\/li>\n<li>\u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f ui<\/li>\n<\/ul>\n<p>  <\/p>\n<h4><b>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/b><\/h4>\n<p>  \u0412\u0441\u0435 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e: \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0434\u0430\u043b\u0435\u0435-\u0434\u0430\u043b\u0435\u0435-\u0434\u0430\u043b\u0435\u0435-\u0444\u0438\u043d\u0438\u0448. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u00ab\u041d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434\u00bb, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 Android Studio.<br \/>  \u0412\u043c\u0435\u0441\u0442\u043e \u00ablivermor\u00bb \u0432 <b>Company Domain<\/b> \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/40d\/3e3\/ba8\/40d3e3ba8e184f0a81c90f0d3af112b3.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d0d\/6a7\/dcb\/d0d6a7dcbfad42f6aea50b8d46014d0a.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/102\/895\/281\/102895281d30411eaef758042a87e6e6.png\"\/><\/p>\n<p>  \u041f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0432\u0432\u0435\u0440\u0445\u0443 Android \u043d\u0430 Project. \u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0438 \u0433\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0b2\/945\/100\/0b2945100c2f4c5d8dca359ca29af333.png\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4><b>\u041f\u0438\u0448\u0435\u043c \u0431\u043e\u0442\u0430<\/b><\/h4>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0438 \u0441\u0430\u043c\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0431\u043e\u0442\u0430.<br \/>  \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0435\u0449\u0435 \u0440\u0430\u0437 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0431\u044b \u0432\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. <br \/>  \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0435\u0449\u0435 \u0440\u0430\u0437:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0438 \u0445\u043e\u0434\u044f\u0442 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041e\u0434\u0438\u043d \u0438\u0433\u0440\u0430\u0435\u0442 \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0438, \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430 \u0440\u044f\u0434\u044b. \u0412\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043e\u0434\u043d\u0438\u043c \u0438\u0433\u0440\u043e\u043a\u043e\u043c \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0435\u0433\u043e \u043e\u0447\u043a\u0430\u043c \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u044f\u0434(\u0441\u0442\u0440\u043e\u043a\u0443) \u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0425\u043e\u0434\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u043e\u0431\u0435\u0436\u0434\u0430\u0435\u0442 \u0442\u043e\u0442, \u0443 \u043a\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0447\u043a\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u0435\u0446 \u0438\u0433\u0440\u044b (\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0445\u043e\u0434\u043e\u0432).  <\/div>\n<\/div>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430, \u2014 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0445\u043e\u0434\u044b \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041b\u0438\u0431\u043e \u0434\u043e n-\u0433\u043e \u0445\u043e\u0434\u0430. \u041d\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0445\u043e\u0434\u044b? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 <b><i>\u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0445\u043e\u0434\u0430<\/i><\/b>. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u043c \u0445\u043e\u0434\u043e\u043c \u0438 <b><i>\u043b\u0443\u0447\u0448\u0438\u043c \u0445\u043e\u0434\u043e\u043c<\/i><\/b> \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434, \u043e\u0436\u0438\u0434\u0430\u044f, \u0447\u0442\u043e \u0432\u044b \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c\u2026 \u0418 \u0442\u0430\u043a \u0434\u043e n. \u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0440\u044f\u0434\u0443.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u043e-\u0432\u0430\u0448\u0435\u043c\u0443, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0431\u043e\u0442\u0430?<br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c.<br \/>  \u0412\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0432 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430? <br \/>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a <b>\u0431\u0443\u0434\u0435\u0442<\/b> \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u044d\u0442\u043e\u0442 <b><i>\u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434<\/i><\/b>. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c -2, \u043e\u0436\u0438\u0434\u0430\u044f, \u0447\u0442\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a \u0432\u043e\u0437\u044c\u043c\u0435\u0442 -3 (\u0435\u0433\u043e <i><b>\u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434<\/b><\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0430\u0440\u0442\u0438\u0438), \u043d\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0434\u0430 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0432 +6. \u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0438 \u043f\u043e\u0439\u0434\u0435\u043c \u0432 -5, \u043e\u0436\u0438\u0434\u0430\u044f, \u0447\u0442\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a \u0441\u0445\u043e\u0434\u0438\u0442 \u0432 -4, \u0430 \u043e\u043d \u043e\u043f\u044f\u0442\u044c \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0434\u0430 \u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 +8. \u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u2014 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0435 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u0445\u043e\u0434\u044b, \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u0438 \u0441\u0435\u0439\u0447\u0430\u0441.<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u043c \u2014 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c n = 2. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u044f\u0434\u0430, \u0438 \u0441\u0430\u043c\u0438\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0448\u0438\u043c\u0438 \u0445\u043e\u0434\u0430\u043c\u0438. \u041a \u0441\u043b\u043e\u0432\u0443, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u043e\u0442\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u043c.<\/p>\n<p>  \u042f \u043f\u043e\u0448\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u043d\u0435\u0435 \u2014 \u0434\u0430\u043b \u0435\u043c\u0443 \u0436\u0430\u0434\u043d\u043e\u0441\u0442\u044c. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044f \u043f\u0440\u0438\u043a\u0430\u0437\u0430\u043b \u0431\u043e\u0442\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u0445\u043e\u0434\u044b, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0447\u043a\u043e\u0432. \u0412 \u043a\u043e\u0434\u0435 \u044f \u043e\u0431\u043e\u0437\u0432\u0430\u043b \u044d\u0442\u0443 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0434\u0436\u0435\u043a\u043f\u043e\u0442\u043e\u043c, \u0438 \u0431\u043e\u0442 \u0441\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u0436\u0435\u043a\u043f\u043e\u0442, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0430\u0436\u0435\u043d\u0438\u044e (\u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043a\u043e\u0434\u0443 \u044f \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435).<\/p>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0431\u043e\u0442\u0430, \u043e\u043f\u0438\u0448\u0443 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435, \u0447\u0442\u043e \u043e\u043d \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442.<br \/>  \u0411\u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0443 <b>\u0418\u0433\u0440\u0430<\/b> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0445\u043e\u0434\u0430 (\u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438\u043b\u0438 \u0432 \u0440\u044f\u0434\u0443). \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0438\u0433\u0440\u044b \u2014\u00a0\u043e\u0447\u043a\u0438 \u0438\u0433\u0440\u043e\u043a\u043e\u0432, \u0431\u0443\u043b\u0435\u0432\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u0445\u043e\u0434\u0430\u043c\u0438, \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u2014\u00a0\u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <b>\u0418\u0433\u0440\u0430<\/b>. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430 \u0411\u043e\u0442, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438 \u0432\u0435\u0449\u0438: \u0438\u0433\u0440\u0430\u0435\u0442 \u043b\u0438 \u0431\u043e\u0442 \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0437\u0430 \u0440\u044f\u0434\u044b \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<br \/>  \u0423 \u0411\u043e\u0442\u0430 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d public \u043c\u0435\u0442\u043e\u0434 \u2014\u00a0\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u043e\u0434, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0445\u043e\u0434. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\u0422\u043e, \u0447\u0442\u043e \u044f \u043e\u0431\u043e\u0437\u0432\u0430\u043b protected, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u2014\u00a0\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0435\u0442\u0435\u0439 \u0431\u043e\u0442\u0430,<br \/>  public \u2014 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438,<br \/>  private \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043a\u0443\u0445\u043d\u044f, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0437\u043d\u0430\u0442\u044c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0439\u043c\u0435\u0442\u0435 \u2014\u00a0\u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u044f \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0432\u043e\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b.<br \/>  \u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0411\u043e\u0442\u0430 \u2014 \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u0447\u0435.  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434 \u0431\u043e\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.livermor.plusminus; \/\/\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c &quot;livermor&quot; \u043d\u0430 \u0432\u0430\u0448 Company Domain  public class Bot {      protected int[][] mMatrix; \/\/digits for buttons     protected boolean[][] mAllowedMoves; \/\/\u0445\u043e\u0434\u044b, \u043a\u0443\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0445\u043e\u0434\u0438\u043b\u0438     protected int mSize; \/\/\u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b     protected int mPlayerPoints = 0, mAiPoints = 0; \/\/\u043e\u0447\u043a\u0438 \u0438\u0433\u0440\u043e\u043a\u043e\u0432     protected boolean mIsVertical; \/\/\u0438\u0433\u0440\u0430\u0435\u043c \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0440\u044f\u0434\u044b     protected int mCurrentActiveNumb; \/\/\u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0445\u043e\u0434\u0430 (\u043e\u0442 0 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u044b(mSize))      \/\/\u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0438 \u0434\u043b\u044f \u0445\u043e\u0434\u043e\u0432     private final static int CANT_GO_THERE = -1000; \/\/\u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0445\u043e\u0434\u0430, \u0442\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u0440\u0435\u0442\u0438\u043d\u0433 -1000     private final static int WORST_MOVE = -500; \/\/ \u0445\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u043c     private final static int VICTORY_MOVE = 500; \/\/ \u0445\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u043c     private final static int JACKPOT_INCREASE = 9; \/\/\u043d\u0430\u0434\u0431\u0430\u0432\u043a\u0430 \u043a \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0443, \u0435\u0441\u043b\u0438 \u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u043a\u0443\u0448     private static final int GOOD_ADVANTAGE = 6;\/\/\u041a\u0443\u0448 (\u0434\u0436\u0435\u043a\u043f\u043e\u0442), \u0440\u0430\u0432\u043d\u044b\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0435 \u0432 6 \u043e\u0447\u043a\u043e\u0432 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435      int depth = 3; \/\/\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430 3 \u0445\u043e\u0434\u0430 \u0432\u043f\u0435\u0440\u0435\u0434      public Bot(             int[][] matrix,             boolean vertical     ) {         mMatrix = matrix;         mSize = matrix.length;         mIsVertical = vertical;     }      \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u043d\u043e\u043c\u0435\u0440 \u0445\u043e\u0434\u0430     public int move(             int playerPoints,             int botPoints,             boolean[][] moves,             int activeNumb     ) {         mPlayerPoints = playerPoints;         mAiPoints = botPoints;         mCurrentActiveNumb = activeNumb;         mAllowedMoves = moves;          return calcMove();     }      \/\/\u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u043f\u0440\u043e\u0441\u0447\u0435\u0442\u0430     public void setDepth(int depth) {         this.depth = depth;     }      protected int calcMove() {         \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0445\u043e\u0434\u0430 \u0438\u0433\u0440\u043e\u043a\u0430         return calcBestMove(depth, mAllowedMoves,                 mCurrentActiveNumb, mIsVertical, mAiPoints, mPlayerPoints);     }      private int calcBestMove(int depth, boolean[][] moves, int lastMove, boolean isVert,                              int myPoints, int hisPoints) {          int result = mSize; \/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0445\u043e\u0434\u043e\u0432         int[] moveRatings = new int[mSize]; \/\/\u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0438 \u0445\u043e\u0434\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435          \/\/\u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0445\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0432 \u0440\u044f\u0434\u0443 (\u0441\u0442\u0440\u043e\u043a\u0435)         if (depth == 1) return findMaxInRow(lastMove, isVert);         else {              int yMe, xMe; \/\/ \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0445\u043e\u0434\u043e\u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430             int yHe, xHe; \/\/ \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0445\u043e\u0434\u043e\u0432 \u043e\u043f\u043f\u043e\u043d\u0435\u043d\u0442\u0430              for (int i = 0; i &lt; mSize; i++) {                  \/\/\u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c (i) \u0432 \u0440\u044f\u0434\u0443 (lastMove)                 yMe = isVert ? i : lastMove;                 xMe = isVert ? lastMove : i;                  \/\/\u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0445\u043e\u0434\u0430, \u0441\u0442\u0430\u0432\u0438\u043c \u0445\u043e\u0434\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433                 if (!mAllowedMoves[yMe][xMe]) {                     moveRatings[i] = CANT_GO_THERE;                     continue; \/\/\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0446\u0438\u043a\u043b\u0443                 }                  int myNewP = myPoints + mMatrix[yMe][xMe];\/\/\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043e\u0447\u043a\u0438 \u0438\u0433\u0440\u043e\u043a\u0430                 moves[yMe][xMe] = false;\/\/\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u0445\u043e\u0434\u0438\u0442\u044c \u0442\u0443\u0434\u0430, \u043a\u0443\u0434\u0430 \u043c\u044b \u0441\u0445\u043e\u0434\u0438\u043b\u0438                  \/\/\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043b\u0443\u0447\u0448\u0438\u0439 \u0445\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430                 int hisBestMove = calcBestMove(depth - 1, moves, i, !isVert, hisPoints, myPoints);                  \/\/\u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0443 \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430 \u043d\u0435\u0442 \u0445\u043e\u0434\u043e\u0432 (\u0442.\u0435. \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b), \u0442\u043e..                 if (hisBestMove == mSize) {                     if (myNewP &gt; hisPoints) \/\/\u0435\u0441\u043b\u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0447\u043a\u043e\u0432, \u0442\u043e \u044d\u0442\u043e \u043f\u043e\u0431\u0435\u0434\u043d\u044b\u0439 \u0445\u043e\u0434                         moveRatings[i] = VICTORY_MOVE;                     else \/\/\u0435\u0441\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435, \u0442\u043e \u044d\u0442\u043e \u0443\u0436\u0430\u0441\u043d\u044b\u0439 \u0445\u043e\u0434                         moveRatings[i] = WORST_MOVE;                      moves[yMe][xMe] = true;\/\/\u041f\u0440\u043e\u0441\u0447\u0435\u0442\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0445\u043e\u0434\u044b \u043a\u0430\u043a \u0431\u044b\u043b\u043e                     continue;                 }                  \/\/\u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0445\u043e\u0434 \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0445\u043e\u0434\u0430\u043c\u0438                 yHe = isVert ? i : hisBestMove;                 xHe = isVert ? hisBestMove : i;                 int hisNewP = hisPoints + mMatrix[yHe][xHe];                 moveRatings[i] = myNewP - hisNewP;                  \/\/\u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u0434\u0431\u0430\u0432\u043a\u0443 \u043a \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430\u043c \u0445\u043e\u0434\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0440\u0432\u0430\u0442\u044c \u043a\u0443\u0448                 \/\/\u0435\u0441\u043b\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u0443\u0436\u0435 \u0440\u0430\u0432\u043d\u0430 1, \u0442\u043e \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0447\u0435\u0442\u044b \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437                 if (depth - 1 != 1) {                      \/\/\u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0430\u043c \u0445\u0432\u0430\u0442\u0438\u0442 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430                     hisBestMove = findMaxInRow(i, !isVert);                     yHe = isVert ? i : hisBestMove;                     xHe = isVert ? hisBestMove : i;                     hisNewP = hisPoints + mMatrix[yHe][xHe];                      int jackpot = myNewP - hisNewP;\/\/\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043a\u0443\u0448\u0430                     if (jackpot &gt;= GOOD_ADVANTAGE) { \/\/\u0435\u0441\u043b\u0438 \u043a\u0443\u0448, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u0434\u0431\u0430\u0432\u043a\u0443                         moveRatings[i] = moveRatings[i] + JACKPOT_INCREASE;                     }                 }                  moves[yMe][xMe] = true;\/\/\u041f\u0440\u043e\u0441\u0447\u0435\u0442\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0445\u043e\u0434\u044b \u043a\u0430\u043a \u0431\u044b\u043b\u043e                              } \/\/ \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0438 \u0445\u043e\u0434\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b, \u043f\u043e\u0440\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0445\u043e\u0434 \u0441 \u043c\u0430\u043a\u0441. \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u043c                          \/\/\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u2014\u00a0\u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0445\u0443\u0434\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u0445\u043e\u0434\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442)             int max = CANT_GO_THERE;             for (int i = 0; i &lt; mSize; i++) {                 if (moveRatings[i] &gt; max) {                     max = moveRatings[i];\/\/\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0445\u043e\u0434 \u043b\u0443\u0447\u0448\u0435, \u043f\u0443\u0441\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u043c                     result = i;                 }             }         }          \/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0445\u043e\u0434 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u043c         return result;     }      \/\/\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u043e\u0434, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0440\u044f\u0434\u0443(\u0441\u0442\u0440\u043e\u043a\u0435)     private int findMaxInRow(int lastM, boolean isVert) {          int currentMax = -10;         int move = mSize;          int y = 0, x = 0;         for (int i = 0; i &lt; mSize; i++) {             y = isVert ? i : lastM;             x = isVert ? lastM : i;             int temp = mMatrix[y][x];             if (mAllowedMoves[y][x] && currentMax &lt;= temp) {                 currentMax = temp;                 move = i;             }         }          return move;     } }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4><b>\u041f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0438\u0433\u0440\u044b<\/b><\/h4>\n<p>  \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u043b\u043e\u0445\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043a\u043e\u0434\u0435. \u0418 \u0432\u043e\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0435\u0440\u0432\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u043e\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0433\u0440\u044b \u0441 \u0431\u043e\u0442\u043e\u043c, \u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043f\u0438\u0448\u0443 \u043a\u043b\u0430\u0441\u0441 \u0438\u0433\u0440\u044b \u0441 \u0431\u043e\u0442\u043e\u043c. \u0414\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430.<\/p>\n<p>  \u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e Game, \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0430\u0445:<br \/>  1. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ui-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438;<br \/>  2. \u0420\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 Game \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f AsyncTask \u0438 Handler \u2014 \u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435 \u043d\u0430 \u043d\u0438\u0445 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445, \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0412 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0435 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434 \u0438\u0433\u0440\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.livermor.plusminus;  import android.os.AsyncTask; import android.os.Handler;  import java.util.Random;  public class Game {      \/\/\u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0447\u043a\u043e\u0432, \u0441\u043c\u0435\u043d\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438     public static final int mTimeToWait = 800;     protected MyAnimation mAnimation; \/\/\u043a\u043b\u0430\u0441\u0441 AsyncTask \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438      \/\/\u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0446\u0438\u0444\u0440 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0445\u043e\u0434\u043e\u0432     protected int[][] mMatrix; \/\/digits for buttons     protected volatile boolean[][] mAllowedMoves;     protected int mSize; \/\/\u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b      protected int playerOnePoints = 0, playerTwoPoints = 0;\/\/\u043e\u0447\u043a\u0438 \u0438\u0433\u0440\u043e\u043a\u043e\u0432      protected volatile boolean isRow = true; \/\/\u043c\u044b \u0438\u0433\u0440\u0430\u0435\u043c \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u043b\u0438 \u0437\u0430 \u0440\u044f\u0434     protected volatile int currentActiveNumb; \/\/\u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0445\u043e\u0434\u0430     protected ResultsCallback mResults;\/\/\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c MainActivity      protected volatile Bot bot;\/\/\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0431\u043e\u0442     Random rnd; \/\/ \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438      public Game(ResultsCallback results, int size) {         mResults = results; \/\/\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430         mSize = size;          rnd = new Random();         generateMatrix(); \/\/\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u043c\u0438 \u0446\u0438\u0444\u0440\u0430\u043c\u0438          \/\/\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0445\u043e\u0434, \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438         currentActiveNumb = rnd.nextInt(mSize);          isRow = true; \/\/\u0432 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0433\u0440\u0430\u0442\u044c \u0437\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 (\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f)          for (int yPos = 0; yPos &lt; mSize; yPos++) {             for (int xPos = 0; xPos &lt; mSize; xPos++) {                  \/\/\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430                 mResults.setButtonText(yPos, xPos, mMatrix[yPos][xPos]);                  if (yPos == currentActiveNumb) \/\/ \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443                     mResults.changeButtonBg(yPos, xPos, isRow, true);             }         }          bot = new Bot(mMatrix, true);     }      public void startGame() {         activateRawOrColumn(true);     }      protected void generateMatrix() {          mMatrix = new int[mSize][mSize];         mAllowedMoves = new boolean[mSize][mSize];          for (int i = 0; i &lt; mSize; i++) {             for (int j = 0; j &lt; mSize; j++) {                  mMatrix[i][j] = rnd.nextInt(19) - 9; \/\/\u043e\u0442 -9 \u0434\u043e 9                 mAllowedMoves[i][j] = true; \/\/ \u0441\u043f\u0435\u0440\u0432\u0430 \u0432\u0441\u0435 \u0445\u043e\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b             }         }     }      \/\/\u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 MainActivity, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f\u043c\u0438 \u043a\u043d\u043e\u043f\u043e\u043a \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438     public void OnUserTouchDigit(int y, int x) {          mResults.onClick(y, x, true);         activateRawOrColumn(false);\/\/\u043f\u043e\u0441\u043b\u0435 \u0445\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u0432\u043e\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438          mAllowedMoves[y][x] = false; \/\/\u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f         playerOnePoints += mMatrix[y][x]; \/\/\u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043e\u0447\u043a\u0438          mResults.changeLabel(false, playerOnePoints);\/\/\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u043e\u0447\u043a\u0438          mAnimation = new MyAnimation(y, x, true, isRow);\/\/\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0441\u043c\u0435\u043d\u044b \u0445\u043e\u0434\u0430         mAnimation.execute();          isRow = !isRow; \/\/\u043f\u043e\u0441\u043b\u0435 \u0445\u043e\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0440\u044f\u0434         currentActiveNumb = x; \/\/\u043f\u043e \u043d\u0430\u0448\u0435\u043c\u0443 \u0445\u043e\u0434\u0443 \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u0442\u0443     }      \/\/\u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0445\u043e\u0434 \u0431\u043e\u0442\u0443     protected void onAnimationFinished() {          if (!isRow) {\/\/\u0432 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u043e\u0442 \u0438\u0433\u0440\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0440\u044f\u0434\u044b (\u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e)              \/\/\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Handler, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 ui, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c             \/\/\u043d\u0435 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. Handel \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430             Handler handler = new Handler();             handler.postDelayed(new Runnable() {                 @Override                 public void run() {                     botMove(); \/\/                 }             }, mTimeToWait \/ 2);          } else \/\/\u0435\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0434, \u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443             activateRawOrColumn(true);     }      private void botMove() {          \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0445\u043e\u0434 \u0431\u043e\u0442\u0430         int botMove = bot.move(playerOnePoints,                 playerTwoPoints, mAllowedMoves, currentActiveNumb);          if (botMove == mSize) {\/\/\u0435\u0441\u043b\u0438 \u0445\u043e\u0434 \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u0437\u043d\u0430\u0447\u0438\u0442 \u0445\u043e\u0434\u043e\u0432 \u043d\u0435\u0442             onResult(); \/\/\u0434\u0435\u0440\u0433\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0438\u0433\u0440\u044b             return; \/\/\u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430         }          int y = botMove; \/\/ \u043f\u043e \u0440\u044f\u0434\u0430\u043c \u0445\u043e\u0434\u0438\u0442 \u0431\u043e\u0442         int x = currentActiveNumb;         mAllowedMoves[y][x] = false;         playerTwoPoints += mMatrix[y][x];         mResults.onClick(y, x, false); \/\/\u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443         mResults.changeLabel(true, playerTwoPoints); \/\/\u043c\u0435\u043d\u044f\u0435\u043c \u043e\u0447\u043a\u0438 \u0431\u043e\u0442\u0430          mAnimation = new MyAnimation(y, x, true, isRow); \/\/\u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043c\u0435\u043d\u0443 \u0445\u043e\u0434\u0430         mAnimation.execute();          isRow = !isRow; \/\/\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438         currentActiveNumb = botMove; \/\/\u043f\u043e \u0445\u043e\u0434\u0443 \u0431\u043e\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u0433\u0434\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0430     }      protected void activateRawOrColumn(final boolean active) {          int countMovesAllowed = 0; \/\/ \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u0442\u044c \u043b\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0445\u043e\u0434\u044b          int y, x;         for (int i = 0; i &lt; mMatrix.length; i++) {              y = isRow ? currentActiveNumb : i;             x = isRow ? i : currentActiveNumb;              if (mAllowedMoves[y][x]) { \/\/\u0435\u0441\u043b\u0438 \u0445\u043e\u0434 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0442\u043e                 mResults.changeButtonClickable(y, x, active); \/\/\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c, \u043b\u0438\u0431\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e                 countMovesAllowed++; \/\/\u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u043c, \u0442\u043e \u0445\u043e\u0434\u043e\u0432 \u043d\u0435\u0442             }         }         if (active && countMovesAllowed == 0) onResult();     }      \/\/\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f: \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u0439     \/\/\u0441\u043f\u0435\u0440\u0432\u0430 \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0445\u043e\u0434\u044b \u2014\u00a0\u0437\u0430\u0442\u0435\u043c \u0441\u0442\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435     protected class MyAnimation extends AsyncTask&lt;Void, Integer, Void&gt; {          int timeToWait = 35; \/\/\u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445         int y, x;         boolean activate;         boolean row;          protected MyAnimation(int y, int x, boolean activate, boolean row) {             this.activate = activate;             this.row = !row;             this.y = y;             this.x = x;         }          @Override         protected Void doInBackground(Void... params) {              int downInc = row ? x - 1 : y - 1;             int uppInc = row ? x : y;              if (activate)                 sleep(Game.mTimeToWait);\/\/\u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0430\u0443\u0437\u044b              if (activate) { \/\/\u043a\u043e\u0433\u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0445\u043e\u0434\u044b, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043e\u0442 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c                 while (downInc &gt;= 0 || uppInc &lt; mSize) {                     \/\/Log.i(TAG, &quot;while in Animation&quot;);                      sleep(timeToWait);                     if (downInc &gt;= 0)                         publishProgress(downInc--); \/\/\u043c\u0435\u0442\u043e\u0434 AsyncTask \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430                      sleep(timeToWait);                     if (uppInc &lt; mSize)                         publishProgress(uppInc++);                 }              } else {\/\/\u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0445\u043e\u0434\u044b, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043e\u0442 \u0433\u0440\u0430\u043d\u0438\u0446 \u043a \u0442\u043e\u0447\u043a\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f                  int downInc2 = 0;                 int uppInc2 = mSize - 1;                  while (downInc2 &lt;= downInc || uppInc2 &gt; uppInc) {                      sleep(timeToWait);                     if (downInc2 &lt;= downInc) publishProgress(downInc2++);                     sleep(timeToWait);                     if (uppInc2 &gt; uppInc) publishProgress(uppInc2--);                 }             }              return null;         }          @Override         protected void onProgressUpdate(Integer... values) {             int numb = values[0];              int yPos = row ? y : numb;             int xPos = row ? numb : x;              \/\/\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0441\u0430 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u043e\u043d\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 (\u0445\u043e\u0434\u043e\u0432)             if (activate) mResults.changeButtonBg(yPos, xPos, row, activate);             else mResults.changeButtonBg(yPos, xPos, row, activate);         }          @Override         protected void onPostExecute(Void aVoid) {              if (activate) \/\/\u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u043e\u0435                 new MyAnimation(y, x, false, row).execute();             else \/\/\u0442\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e, \u0434\u0435\u0440\u0433\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438                 onAnimationFinished();         }          \/\/\u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438         private void sleep(int time) {             try {                 Thread.sleep(time);             } catch (InterruptedException e) {                 e.printStackTrace();             }         }     }      protected void onResult() {         \/\/\u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0441\u0430 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432         mResults.onResult(playerOnePoints, playerTwoPoints);     }      \/\/\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f MainActivity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c ui \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     \/\/*********************************************************************************     public interface ResultsCallback {          \/\/\u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u043e\u0447\u043a\u043e\u0432 \u0438 \u043e\u0447\u043a\u043e\u0432 \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430         void changeLabel(boolean upLabel, int points);          \/\/\u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u043a\u043d\u043e\u043f\u043e\u043a         void changeButtonBg(int y, int x, boolean row, boolean active);          \/\/\u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u0446\u0438\u0444\u0440\u0430\u043c\u0438         void setButtonText(int y, int x, int text);          \/\/\u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438\/\u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043d\u043e\u043f\u043e\u043a         void changeButtonClickable(int y, int x, boolean clickable);          \/\/\u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u0440\u0442\u0438\u0438         void onResult(int one, int two);          \/\/\u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443         void onClick(int y, int x, boolean flyDown);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4><b>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/b><\/h4>\n<p>  \u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0433\u0440\u044b \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0435\u0449\u0438.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043c\u0435\u0442\u043a\u0430 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0432\u0435\u0440\u0445\u0443 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 Project, \u0430 \u043d\u0435 Android.<br \/>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 3 \u043a\u043b\u0430\u0441\u0441\u0430: \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 Bot \u0438 Game \u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 MainActivity. \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e xml-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u043e\u0431\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043a\u0440\u0430\u0441\u043d\u044b\u043c), \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0446\u0438\u0444\u0440-\u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c drawable-\u044d\u043b\u0435\u043c\u0435\u043d\u0442 (\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0447\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u043e\u0439, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/096\/de2\/f93\/096de2f93efa48adbf59199729d5aee8.png\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>1. \u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d\u0443 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f:<\/b><\/h6>\n<p>  \u0412 AndroidManifest \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0434 MainActivity \u2014 android:screenOrientation=\u00abportrait\u00bb<br \/>  \u0414\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d (\u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430).  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">AndroidManifest.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;!-- \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c package \u043d\u0430 \u0441\u0432\u043e\u0439. \u0432\u043e\u043e\u0431\u0449\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 &gt;&gt;&gt; android:screenOrientation=&quot;portrait&quot; --&gt; &lt;manifest package=&quot;com.livermor.plusminus&quot;           xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;      &lt;application         android:allowBackup=&quot;true&quot;         android:icon=&quot;@mipmap\/ic_launcher&quot;         android:label=&quot;@string\/app_name&quot;         android:supportsRtl=&quot;true&quot;         android:theme=&quot;@style\/AppTheme&quot;&gt;         &lt;activity android:name=&quot;.MainActivity&quot;                   android:screenOrientation=&quot;portrait&quot;&gt;             &lt;intent-filter&gt;                 &lt;action android:name=&quot;android.intent.action.MAIN&quot;\/&gt;                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;\/&gt;             &lt;\/intent-filter&gt;         &lt;\/activity&gt;     &lt;\/application&gt;  &lt;\/manifest&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>2. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0446\u0432\u0435\u0442\u0430:<\/b><\/h6>\n<p>  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 colors.xml, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0446\u0432\u0435\u0442\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">colors.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;resources&gt;     &lt;color name=&quot;colorPrimary&quot;      &gt;#7C7B7B&lt;\/color&gt;     &lt;color name=&quot;colorPrimaryDark&quot;  &gt;#424242&lt;\/color&gt;     &lt;color name=&quot;colorAccent&quot;       &gt;#FF4081&lt;\/color&gt;     &lt;color name=&quot;bgGrey&quot;            &gt;#C4C4C4&lt;\/color&gt;     &lt;color name=&quot;bgRed&quot;             &gt;#FC5C70&lt;\/color&gt;     &lt;color name=&quot;bgBlue&quot;            &gt;#4A90E2&lt;\/color&gt;     &lt;color name=&quot;black&quot;             &gt;#000&lt;\/color&gt;     &lt;color name=&quot;lightGreyBg&quot;       &gt;#DFDFDF&lt;\/color&gt;     &lt;color name=&quot;white&quot;             &gt;#fff&lt;\/color&gt; &lt;\/resources&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>3. \u041c\u0435\u043d\u044f\u0435\u043c \u0442\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/b><\/h6>\n<p>  \u0412 styles.xml \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c <i>Theme.AppCompat.Light.DarkActionBar<\/i> \u043d\u0430 <i>Theme.AppCompat.Light.NoActionBar<\/i>:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">styles.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;resources&gt;     &lt;style name=&quot;AppTheme&quot; parent=&quot;Theme.AppCompat.Light.NoActionBar&quot;&gt;         &lt;item name=&quot;colorPrimary&quot;&gt;@color\/colorPrimary&lt;\/item&gt;         &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color\/colorPrimaryDark&lt;\/item&gt;         &lt;item name=&quot;colorAccent&quot;&gt;@color\/colorAccent&lt;\/item&gt;     &lt;\/style&gt; &lt;\/resources&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>4. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b:<\/b><\/h6>\n<p>  \u0417\u0430\u043c\u0435\u043d\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0432 dimens.xml \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435::  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">dimens.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;resources&gt;     &lt;dimen name=&quot;button.radius&quot;&gt;10dp&lt;\/dimen&gt;     &lt;dimen name=&quot;sides&quot;&gt;10dp&lt;\/dimen&gt;     &lt;dimen name=&quot;up_bottom&quot;&gt;20dp&lt;\/dimen&gt;     &lt;dimen name=&quot;label_height&quot;&gt;55dp&lt;\/dimen&gt;     &lt;dimen name=&quot;label_text_size&quot;&gt;40dp&lt;\/dimen&gt;     &lt;dimen name=&quot;label_padding_sides&quot;&gt;6dp&lt;\/dimen&gt; &lt;\/resources&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>5. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u043e\u043d\u044b \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a:<\/b><\/h6>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0440\u0438 xml \u0432 \u043f\u0430\u043f\u043a\u0435 drawable:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">bg_blue.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;shape xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;     &lt;solid android:color=&quot;@color\/bgBlue&quot;\/&gt;      &lt;corners android:bottomRightRadius=&quot;@dimen\/button_radius&quot;              android:bottomLeftRadius=&quot;@dimen\/button_radius&quot;              android:topLeftRadius=&quot;@dimen\/button_radius&quot;              android:topRightRadius=&quot;@dimen\/button_radius&quot;\/&gt; &lt;\/shape&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">bg_red.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;shape xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;     &lt;solid android:color=&quot;@color\/bgRed&quot;\/&gt;      &lt;corners android:bottomRightRadius=&quot;@dimen\/button_radius&quot;              android:bottomLeftRadius=&quot;@dimen\/button_radius&quot;              android:topLeftRadius=&quot;@dimen\/button_radius&quot;              android:topRightRadius=&quot;@dimen\/button_radius&quot;\/&gt; &lt;\/shape&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">bg_grey.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;shape xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;     &lt;solid android:color=&quot;@color\/bgGrey&quot;\/&gt;      &lt;corners android:bottomRightRadius=&quot;@dimen\/button_radius&quot;              android:bottomLeftRadius=&quot;@dimen\/button_radius&quot;              android:topLeftRadius=&quot;@dimen\/button_radius&quot;              android:topRightRadius=&quot;@dimen\/button_radius&quot;\/&gt; &lt;\/shape&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>6. \u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0430\u043a\u0435\u0442 \u044d\u043a\u0440\u0430\u043d\u0430:<\/b><\/h6>\n<p>  \u0414\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GridLayout \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u043e\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c.<br \/>  \u041f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \u043d\u0430 \u043c\u043e\u0439 \u2014\u00a0\u0442\u0430\u043c \u043f\u0443\u0441\u0442\u043e\u0439 GridLayout (\u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u043a\u043e\u0434\u043e\u043c \u0432 MainActivity) \u0438 \u0434\u0432\u0430 TextView-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0447\u043a\u043e\u0432 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 (RelativeLayout \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e RelativeLayout \u2014 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438. View \u00abcenter\u00bb \u2014 \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0447\u043a\u043e\u0432 \u043a \u0446\u0435\u043d\u0442\u0440\u0443 \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438). <br \/>  \u0414\u0430, \u0438 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u0442\u0435\u0441\u044c, \u0432 preview \u0432\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0440\u043e\u043c\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0411\u043e\u0442, \u0442\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">activity_main.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;RelativeLayout     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:background=&quot;#000&quot;     tools:context=&quot;com.livermor.myapplication.MainActivity&quot;&gt;      &lt;RelativeLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;         android:layout_centerVertical=&quot;true&quot;         android:background=&quot;@color\/lightGreyBg&quot;&gt;          &lt;View             android:id=&quot;@+id\/center&quot;             android:layout_width=&quot;10dp&quot;             android:layout_height=&quot;1dp&quot;             android:layout_centerInParent=&quot;true&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/upper_scoreboard&quot;             android:background=&quot;@drawable\/bg_red&quot;             android:layout_width=&quot;match_parent&quot;             android:layout_height=&quot;55dp&quot;             android:layout_alignParentLeft=&quot;true&quot;             android:layout_alignParentTop=&quot;true&quot;             android:layout_marginLeft=&quot;@dimen\/sides&quot;             android:layout_marginTop=&quot;15dp&quot;             android:layout_toLeftOf=&quot;@id\/center&quot;             android:gravity=&quot;center_vertical|center_horizontal&quot;             android:paddingLeft=&quot;@dimen\/label_padding_sides&quot;             android:paddingRight=&quot;@dimen\/label_padding_sides&quot;             android:text=&quot;\u0411\u043e\u0442: 0&quot;             android:textColor=&quot;@color\/white&quot;             android:textSize=&quot;@dimen\/label_text_size&quot;\/&gt;          &lt;GridLayout             xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;             android:id=&quot;@+id\/my_grid&quot;             android:layout_width=&quot;match_parent&quot;             android:layout_height=&quot;match_parent&quot;             android:layout_below=&quot;@+id\/upper_scoreboard&quot;             android:layout_gravity=&quot;center&quot;             android:foregroundGravity=&quot;center&quot;             android:layout_marginLeft=&quot;@dimen\/sides&quot;             android:layout_marginRight=&quot;@dimen\/sides&quot;             android:layout_marginBottom=&quot;@dimen\/up_bottom&quot;             android:layout_marginTop=&quot;@dimen\/up_bottom&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/lower_scoreboard&quot;             android:background=&quot;@drawable\/bg_blue&quot;             android:layout_width=&quot;match_parent&quot;             android:layout_height=&quot;@dimen\/label_height&quot;             android:layout_alignParentRight=&quot;true&quot;             android:layout_alignParentEnd=&quot;true&quot;             android:layout_below=&quot;@+id\/my_grid&quot;             android:layout_marginBottom=&quot;15dp&quot;             android:layout_marginRight=&quot;15dp&quot;             android:layout_toRightOf=&quot;@id\/center&quot;             android:gravity=&quot;center_vertical|center_horizontal&quot;             android:paddingLeft=&quot;@dimen\/label_padding_sides&quot;             android:paddingRight=&quot;@dimen\/label_padding_sides&quot;             android:text=&quot;\u0412\u044b: 0&quot;             android:textColor=&quot;@color\/white&quot;             android:textSize=&quot;@dimen\/label_text_size&quot;\/&gt;      &lt;\/RelativeLayout&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>7. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 MyButton, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 Button:<\/b><\/h6>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.livermor.plusminus;  import android.content.Context; import android.util.AttributeSet; import android.widget.Button;  public class MyButton extends Button {          private MyOnClickListener mClickListener;\/\/\u043d\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0443\u0447\u0435\u0442\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u0434\u043b\u044f MainActivity     int idX = 0;     int idY = 0;      \/\/\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435     public MyButton(Context context, int x, int y) {         super(context);         idX = x;         idY = y;     }      public MyButton(Context context) {         super(context);     }      public MyButton(Context context, AttributeSet attrs) {         super(context, attrs);     }      public MyButton(Context context, AttributeSet attrs, int defStyleAttr) {         super(context, attrs, defStyleAttr);     }      @Override \/\/\u043c\u0435\u0442\u043e\u0434 View \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0438\u043a\u043e\u0432     public boolean performClick() {         super.performClick();          mClickListener.OnTouchDigit(this);\/\/\u0431\u0443\u0434\u0435\u043c \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430         return true;     }      public void setOnClickListener(MyOnClickListener listener){         mClickListener = listener;     }      public int getIdX(){         return idX;     }      public int getIdY(){         return idY;     }      \/\/\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f MainActivity     \/\/************************************     public interface MyOnClickListener {          void OnTouchDigit(MyButton v);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><b>8. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 MainActivity:<\/b><\/h6>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.livermor.plusminus;  import android.graphics.Typeface; import android.os.Handler; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.animation.AlphaAnimation; import android.view.animation.AnimationSet; import android.view.animation.TranslateAnimation; import android.widget.Button; import android.widget.GridLayout; import android.widget.TextView; import android.widget.Toast;  public class MainActivity extends AppCompatActivity         implements Game.ResultsCallback, MyButton.MyOnClickListener {      private static final int MATRIX_SIZE = 5;\/\/ \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442 2 \u0434\u043e 20))      \/\/ui     private TextView mUpText, mLowText;     GridLayout mGridLayout;     private MyButton[][] mButtons;      private Game game;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          mGridLayout = (GridLayout) findViewById(R.id.my_grid);         mGridLayout.setColumnCount(MATRIX_SIZE);         mGridLayout.setRowCount(MATRIX_SIZE);         mButtons = new MyButton[MATRIX_SIZE][MATRIX_SIZE];\/\/5 \u0441\u0442\u0440\u043e\u043a \u0438 5 \u0440\u044f\u0434\u043e\u0432          \/\/\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 \u0434\u043b\u044f \u0446\u0438\u0444\u0440         for (int yPos = 0; yPos &lt; MATRIX_SIZE; yPos++) {             for (int xPos = 0; xPos &lt; MATRIX_SIZE; xPos++) {                 MyButton mBut = new MyButton(this, xPos, yPos);                  mBut.setTextSize(30-MATRIX_SIZE);                 Typeface boldTypeface = Typeface.defaultFromStyle(Typeface.BOLD);                 mBut.setTypeface(boldTypeface);                 mBut.setTextColor(ContextCompat.getColor(this, R.color.white));                 mBut.setOnClickListener(this);                 mBut.setPadding(1, 1, 1, 1); \/\/\u0442\u0430\u043a \u0446\u0438\u0444\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440                  mBut.setAlpha(1);                 mBut.setClickable(false);                  mBut.setBackgroundResource(R.drawable.bg_grey);                  mButtons[yPos][xPos] = mBut;                 mGridLayout.addView(mBut);             }         }                  mUpText = (TextView) findViewById(R.id.upper_scoreboard);         mLowText = (TextView) findViewById(R.id.lower_scoreboard);          \/\/\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 mGridLayout         mGridLayout.getViewTreeObserver().addOnGlobalLayoutListener(                 new ViewTreeObserver.OnGlobalLayoutListener() {                     @Override                     public void onGlobalLayout() {                         setButtonsSize();                         \/\/\u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f OnGlobalLayoutListener                         mGridLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);                     }                 });          game = new Game(this, MATRIX_SIZE); \/\/\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0438\u0433\u0440\u044b         game.startGame(); \/\/\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0435      }\/\/onCreate      private void setButtonsSize() {         int pLength;         final int MARGIN = 6;          int pWidth = mGridLayout.getWidth();         int pHeight = mGridLayout.getHeight();         int numOfCol = MATRIX_SIZE;         int numOfRow = MATRIX_SIZE;          \/\/\u0441\u0434\u0435\u043b\u0430\u0435\u043c mGridLayout \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u043c         if (pWidth &gt;= pHeight) pLength = pHeight;         else pLength = pWidth;         ViewGroup.LayoutParams pParams = mGridLayout.getLayoutParams();         pParams.width = pLength;         pParams.height = pLength;         mGridLayout.setLayoutParams(pParams);          int w = pLength \/ numOfCol;         int h = pLength \/ numOfRow;          for (int yPos = 0; yPos &lt; MATRIX_SIZE; yPos++) {             for (int xPos = 0; xPos &lt; MATRIX_SIZE; xPos++) {                 GridLayout.LayoutParams params = (GridLayout.LayoutParams)                         mButtons[yPos][xPos].getLayoutParams();                 params.width = w - 2 * MARGIN;                 params.height = h - 2 * MARGIN;                 params.setMargins(MARGIN, MARGIN, MARGIN, MARGIN);                 mButtons[yPos][xPos].setLayoutParams(params);                 \/\/Log.w(TAG, &quot;process goes in customizeMatrixSize&quot;);             }         }     }      \/\/MyButton.MyOnClickListener \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441     \/\/*************************************************************************     @Override     public void OnTouchDigit(MyButton v) {         game.OnUserTouchDigit(v.getIdY(), v.getIdX());     }      \/\/Game.ResultsCallback \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441     \/\/*************************************************************************     @Override     public void changeLabel(boolean upLabel, int points) {         if (upLabel) mUpText.setText(String.format(&quot;\u0411\u043e\u0442: %d&quot;, points));         else mLowText.setText(String.valueOf(String.format(&quot;\u0412\u044b: %d&quot;, points)));     }      @Override     public void changeButtonBg(int y, int x, boolean row, boolean active) {          if (active) {             if (row) mButtons[y][x].setBackgroundResource(R.drawable.bg_blue);             else mButtons[y][x].setBackgroundResource(R.drawable.bg_red);          } else {             mButtons[y][x].setBackgroundResource(R.drawable.bg_grey);         }     }      @Override     public void setButtonText(int y, int x, int text) {         mButtons[y][x].setText(String.valueOf(text));     }      @Override     public void changeButtonClickable(int y, int x, boolean clickable) {         mButtons[y][x].setClickable(clickable);     }      @Override     public void onResult(int playerOnePoints, int playerTwoPoints) {          String text;         if (playerOnePoints &gt; playerTwoPoints) text = &quot;\u0432\u044b \u043f\u043e\u0431\u0435\u0434\u0438\u043b\u0438&quot;;         else if (playerOnePoints &lt; playerTwoPoints) text = &quot;\u0431\u043e\u0442 \u043f\u043e\u0431\u0435\u0434\u0438\u043b&quot;;         else text = &quot;\u043d\u0438\u0447\u044c\u044f&quot;;          Toast.makeText(this, text, Toast.LENGTH_SHORT).show();          \/\/\u0447\u0435\u0440\u0435\u0437 1500 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434 run         new Handler().postDelayed(new Runnable() {             @Override             public void run() {                 recreate(); \/\/\u043d\u0430\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0438\u0433\u0440\u0443 \u2014 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 MainActivity             }         }, 1500);     }      @Override     public void onClick(final int y, final int x, final boolean flyDown) {          final Button currentBut = mButtons[y][x];          currentBut.setAlpha(0.7f);         currentBut.setClickable(false);          AnimationSet sets = new AnimationSet(false);         int direction = flyDown ? 400 : -400;         TranslateAnimation animTr = new TranslateAnimation(0, 0, 0, direction);         animTr.setDuration(810);         AlphaAnimation animAl = new AlphaAnimation(0.4f, 0f);         animAl.setDuration(810);         sets.addAnimation(animTr);         sets.addAnimation(animAl);         currentBut.startAnimation(sets);          new Handler().postDelayed(new Runnable() {             @Override             public void run() {                  currentBut.clearAnimation();                 currentBut.setAlpha(0);             }         }, 800);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4><b>\u0424\u0438\u043d\u0438\u0448\u043d\u0430\u044f \u043f\u0440\u044f\u043c\u0430\u044f<\/b><\/h4>\n<p>  \u041c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u043b\u0438 \u0432 \u043b\u0438\u0447\u043a\u0443. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0449\u0435 \u0440\u0430\u0437 \u0434\u0430\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/Liverm0r\/PlusMinus\">\u0433\u0438\u0442\u0445\u0430\u0431<\/a>. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0438\u0434\u0435\u0438 \u043f\u043e \u0431\u043e\u0442\u0443 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0434\u0443.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/271899\/\"> http:\/\/habrahabr.ru\/post\/271899\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041a\u043e\u0433\u0434\u0430 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (3 \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434), \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441 \u0443\u0442\u0440\u0430 \u0434\u043e \u0432\u0435\u0447\u0435\u0440\u0430 \u0441\u0438\u0434\u0435\u0442\u044c \u0437\u0430 \u043a\u043d\u0438\u0433\u0430\u043c\u0438 \u0438\u043b\u0438 \u043a\u0443\u0440\u0441\u0430\u043c\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0435, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0441 \u0443\u0442\u0440\u0430 \u0434\u043e \u0443\u0442\u0440\u0430. <\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014\u00a0\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u0433\u0440\u0443 \u0441 \u0431\u043e\u0442\u043e\u043c. \u0418\u0433\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"420\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/SOnbB5cw-eg?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  <i>*\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u0418\u0418.<\/i><\/p>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e \u043d\u0430 \u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f\u044b.  <\/p>\n<ol>\n<li>\u041d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434.<br \/>  \u0412\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0432 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0441 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0410 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 <a href=\"https:\/\/github.com\/Liverm0r\/PlusMinus\">\u0433\u0438\u0442\u0445\u0430\u0431\u0430<\/a>. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/li>\n<li>\u0423\u0436\u0435 \u0443\u043c\u0435\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438.<br \/>  \u0412\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443. \u042f \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0435\u043d\u043a\u0443 \u043f\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0433\u0440\u044b \u0438 ui-\u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439, \u0432\u0430\u043c \u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0438\u0433\u0440\u044b (2 \u043d\u0430 2, \u043e\u043d\u043b\u0430\u0439\u043d \u0438 \u0442.\u043f.), \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u043e\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0440\u043e\u0432\u043d\u0438 \u0438 \u0442.\u0434. <\/li>\n<li>\u041e\u043f\u044b\u0442\u043d\u044b\u0435.<br \/>  \u0412\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0434 \u0418\u0418 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u0422\u0430\u043a \u0436\u0435 \u044f \u0431\u044b\u043b \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u0432\u0430\u0441 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u2014 \u0443\u0432\u0435\u0440\u0435\u043d, \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e.<\/li>\n<\/ol>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-269282","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269282","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=269282"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269282\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}