{"id":316772,"date":"2021-01-22T15:00:15","date_gmt":"2021-01-22T15:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316772"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316772","title":{"rendered":"2048 WASM \u0438\u043b\u0438 \u0438\u0433\u0440\u0430 \u043d\u0430 Rust \u0437\u0430 2 \u0434\u043d\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437-\u0441\u0435\u0431\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 Rust&#8217;\u043e\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439 \u0432 WASM. \u0411\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0430 \u0447\u0435\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0438\u0433\u0440\u0443 <a href=\"https:\/\/github.com\/gabrielecirulli\/2048\" rel=\"nofollow noopener noreferrer\">2048<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rt\/-k\/90\/rt-k901fdr4idddptsxtz2xclo0.png\">  <\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"opisanie-igry\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b<\/h1>\n<p>  <\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0433\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 4 \u043d\u0430 4. \u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u043f\u0443\u0441\u0442\u043e\u0439, \u043b\u0438\u0431\u043e \u0437\u0430\u043d\u044f\u0442\u0430 \u043f\u043b\u0438\u0442\u043a\u043e\u0439<br \/>  \u0441 \u0447\u0438\u0441\u043b\u043e\u043c, \u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0434\u0432\u043e\u0439\u043a\u0438. \u0421\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u0438\u043c\u0435\u0435\u0442 2 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0435\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hl\/6v\/v4\/hl6vv4vvnj647sbittzjoaiffca.png\">  <\/p>\n<p>  <\/p>\n<p>\u0418\u0433\u0440\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0445\u043e\u0434 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 4 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439: \u0432\u043b\u0435\u0432\u043e, \u0432\u043f\u0440\u0430\u0432\u043e, \u0432\u0432\u0435\u0440\u0445 \u0438 \u0432\u043d\u0438\u0437, \u0447\u0442\u043e \u0441\u0434\u0432\u0438\u0433\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0434\u043e \u0443\u043f\u043e\u0440\u0430 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c<br \/>  \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0434\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u043b\u0438\u0442\u043a\u0430. \u041d\u043e\u0432\u0430\u044f \u043f\u043b\u0438\u0442\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043a\u0443 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 90% \u0438\u043b\u0438 \u0447\u0435\u0442\u0432\u0435\u0440\u043a\u0443<br \/>  \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 10%.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435, \u0432\u043f\u0440\u0430\u0432\u043e:<\/p>\n<p>  <\/p>\n<p> <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jg\/3a\/do\/jg3adokkhowtrz66wly_pr-z3-u.png\">  <\/p>\n<p>  <\/p>\n<p>\u041f\u043b\u0438\u0442\u043a\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0440\u044f\u0434\u0443 \u0443\u043f\u0435\u0440\u043b\u0430\u0441\u044c \u0432 \u043f\u0440\u0430\u0432\u0443\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0434\u0432\u043e\u0439\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u044f\u0434\u0443, \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043b\u0438\u0442\u043a\u0430 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043b\u0438\u0442\u043a\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0447\u0438\u0441\u043b\u043e, \u043e\u043d\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u043f\u043b\u0438\u0442\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432\u0432\u0435\u0440\u0445:<\/p>\n<p>  <\/p>\n<p> <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qz\/be\/xq\/qzbexqqlvbppx5hjfjocr0fykto.png\">  <\/p>\n<p>  <\/p>\n<p>\u0414\u0432\u043e\u0439\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0441\u044c \u0432 \u043e\u0434\u043d\u0443, \u0430 \u043a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0447\u0435\u0442\u0432\u0435\u0440\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0426\u0435\u043b\u044c \u0438\u0433\u0440\u044b: \u0434\u043e\u0439\u0442\u0438 \u0434\u043e \u043f\u043b\u0438\u0442\u043a\u0438 \u0441 \u0447\u0438\u0441\u043b\u043e\u043c 2048.<\/p>\n<p>  <\/p>\n<h1 id=\"podgotovka\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 Rust, \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 <a href=\"https:\/\/awesomeopensource.com\/project\/flosse\/rust-web-framework-comparison\" rel=\"nofollow noopener noreferrer\">\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0440\u043e\u043d\u0442\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f Rust.<br \/>  \u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <a href=\"https:\/\/yew.rs\/\" rel=\"nofollow noopener noreferrer\">Yew<\/a> \u2014 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043e\u043f\u044b\u0442\u0430 \u0441 React&#8217;\u043e\u043c, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442,<br \/>  \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/yew.rs\/docs\/en\/getting-started\/build-a-sample-app\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cargo new --lib rust-2048 &amp;&amp; cd rust-2048<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435, \u0432 Cargo.toml \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[dependencies] yew = &quot;0.17&quot; wasm-bindgen = &quot;0.2.67&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 <code>src\/lib.rs<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"rust\">use wasm_bindgen::prelude::*; use yew::prelude::*; struct Model {     link: ComponentLink&lt;Self&gt;,     value: i64, } enum Msg {     AddOne, } impl Component for Model {     type Message = Msg;     type Properties = ();     fn create(_: Self::Properties, link: ComponentLink&lt;Self&gt;) -&gt; Self {         Self {             link,             value: 0,         }     }     fn update(&amp;mut self, msg: Self::Message) -&gt; ShouldRender {         match msg {             Msg::AddOne =&gt; self.value += 1         }         true     }     fn change(&amp;mut self, _props: Self::Properties) -&gt; ShouldRender {         \/\/ Should only return &quot;true&quot; if new properties are different to         \/\/ previously received properties.         \/\/ This component has no properties so we will always return &quot;false&quot;.         false     }     fn view(&amp;self) -&gt; Html {         html! {             &lt;div&gt;                 &lt;button onclick=self.link.callback(|_| Msg::AddOne)&gt;{ &quot;+1&quot; }&lt;\/button&gt;                 &lt;p&gt;{ self.value }&lt;\/p&gt;             &lt;\/div&gt;         }     } } #[wasm_bindgen(start)] pub fn run_app() {     App::&lt;Model&gt;::new().mount_to_body(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">mkdir static<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u043c index.html \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt;   &lt;head&gt;     &lt;meta charset=&quot;utf-8&quot; \/&gt;     &lt;title&gt;Yew Sample App&lt;\/title&gt;     &lt;script type=&quot;module&quot;&gt;       import init from &quot;.\/wasm.js&quot;;       init();     &lt;\/script&gt;   &lt;\/head&gt;   &lt;body&gt;&lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 wasm-pack (\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>cargo install wasm-pack<\/code>):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">wasm-pack build --target web --out-name wasm --out-dir .\/static<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Error: crate-type must be cdylib to compile to wasm32-unknown-unknown. Add the following to your Cargo.toml file: [lib] crate-type = [&quot;cdylib&quot;, &quot;rlib&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u043a\u0435\u0439, \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Cargo.toml \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0446\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">[lib] crate-type = [&quot;cdylib&quot;, &quot;rlib&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c miniserve, \u044f \u0436\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd static python -m SimpleHTTPServer<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"http:\/\/127.0.0.1:8000\" rel=\"nofollow noopener noreferrer\">http:\/\/127.0.0.1:8000<\/a> \u0438 \u0432\u0438\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a. \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u0439 \u0438\u0433\u0440\u0435.<\/p>\n<p>  <\/p>\n<h1 id=\"osnova\">\u041e\u0441\u043d\u043e\u0432\u0430<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442: <a href=\"https:\/\/github.com\/dev-family\/wasm-2048\/commit\/6bc015fbc88c1633f4605944fd920b2780e261c1\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/dev-family\/wasm-2048\/commit\/6bc015fbc88c1633f4605944fd920b2780e261c1<\/a><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043b\u0438\u0442\u043e\u043a \u0431\u0435\u0437 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b<br \/>  \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u0438\u0442\u043e\u043a \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">2, 4, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0431\u044b\u043b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d \u0445\u043e\u0434 \u0432\u043f\u0440\u0430\u0432\u043e. \u041e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">0, 0, 2, 4 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0438\u0434\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0446\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e.<br \/>  \u041f\u0440\u043e\u0438\u0442\u0435\u0440\u0438\u0440\u0443\u044e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0412\u044b\u0431\u0440\u0430\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043f\u0440\u0430\u0432\u043e =&gt; \u0438\u0434\u0435\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u0432\u043b\u0435\u0432\u043e.<\/li>\n<\/ol>\n<p>  <\/p>\n<pre><code class=\"plaintext\">         \/-------- \u043f\u0443\u0441\u0442\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c 2, 4, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>2.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">      \/-------- \u043f\u0443\u0441\u0442\u0430\u044f \u043a\u043b\u0435\u0442\u043a\u0430, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c 2, 4, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>3.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">    \/-------- \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u043f\u0440\u0430\u0432\u043e 2, 4, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>4.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">       \/-------- \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c 2, 0, 4, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>5.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">         \/-------- \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 2, 0, 0, 4 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>6.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> \/-------- \u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0432\u043f\u0440\u0430\u0432\u043e 2, 0, 0, 4 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>7.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">    \/-------- \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c 0, 2, 0, 4 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>8.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">       \/-------- \u043e\u0441\u0442\u043e\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 0, 0, 2, 4 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0434\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u2014 \u0441\u0442\u043e\u043b\u0431\u0446\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 <code>Direction#build_traversal<\/code> (\u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u043e\u0431\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u044f),<br \/>  <code>Grid#traverse_from<\/code> (\u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e) \u0438 <code>Grid#move_in<\/code> \u2014 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0434\u0432\u0430.<\/p>\n<p>  <\/p>\n<h1 id=\"obedineniya\">\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442: <a href=\"https:\/\/github.com\/dev-family\/wasm-2048\/commit\/7e08b5af6008e6f9d716d7c9a41b0810e869df9e\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/dev-family\/wasm-2048\/commit\/7e08b5af6008e6f9d716d7c9a41b0810e869df9e<\/a><\/p>\n<p>  <\/p>\n<p>\u0423 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0438\u0442\u043e\u043a \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043f\u043b\u0438\u0442\u043a\u0438 \u043d\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0430,<br \/>  \u0442.\u0435. \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0435\u0437\u0436\u0430\u044e\u0449\u0438\u0445 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 4 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u043b\u0438\u0442, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f 2 \u043f\u043b\u0438\u0442\u043a\u0438<br \/>  \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0443 \u043f\u043b\u0438\u0442\u043e\u043a \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e<br \/>  \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0445\u043e\u0434\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043b\u044e\u0441, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 TestCase, \u0442.\u043a. \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0434\u043e\u0432.<\/p>\n<p>  <\/p>\n<h1 id=\"dobavlenie-novyh-plitok\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043b\u0438\u0442\u043e\u043a<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442: <a href=\"https:\/\/github.com\/dev-family\/wasm-2048\/commit\/6082409412f6c19943c453c5d706d57bbcef538b\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/dev-family\/wasm-2048\/commit\/6082409412f6c19943c453c5d706d57bbcef538b<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/crates.io\/crates\/rand\" rel=\"nofollow noopener noreferrer\">rand<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0432 WASM \u0441\u0440\u0435\u0434\u0435<br \/>  \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>wasm-bindgen<\/code> feature.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u044b \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445<br \/>  \u043f\u043b\u0438\u0442\u043e\u043a \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>Grid<\/code> \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u043e\u0432\u043e\u0435 \u0444\u043b\u0430\u0433\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 <code>enable_new_tiles<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u043e\u0432\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e \u0445\u043e\u0434\u0430 (\u0442.\u0435. \u0437\u0430 \u0445\u043e\u0434 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0445\u043e\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f),<br \/>  \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 <code>traverse_from<\/code> \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0431\u044b\u043b\u043e \u043b\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h1 id=\"ui\">UI<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442: <a href=\"https:\/\/github.com\/dev-family\/wasm-2048\/commit\/356e0889a84d7fc2582662e76238f94fc69bfed7\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/dev-family\/wasm-2048\/commit\/356e0889a84d7fc2582662e76238f94fc69bfed7<\/a><\/p>\n<p>  <\/p>\n<p>UI \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0441 React \u0438\/\u0438\u043b\u0438 JSX. \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e <code>html!<\/code> \u043c\u0430\u043a\u0440\u043e\u0441 \u0438\u0437 Yew \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/yew.rs\/docs\/en\/concepts\/html\/\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>,<br \/>  \u0430 \u043f\u0440\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u043e\u0431\u0449\u0435\u043c <a href=\"https:\/\/yew.rs\/docs\/en\/concepts\/components\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u041c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u043e React \u0432 \u043f\u0440\u0435-\u0445\u0443\u043a\u043e\u0432\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u0434\u0430 \u0438 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043d\u0443\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<p>  <\/p>\n<h1 id=\"animacii\">\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/h1>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442: <a href=\"https:\/\/github.com\/dev-family\/wasm-2048\/commit\/e258748ab114ec5f930dbeb77d674bdbc5e63b1a\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/dev-family\/wasm-2048\/commit\/e258748ab114ec5f930dbeb77d674bdbc5e63b1a<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0436\u0438\u0432\u044b\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 CSS transitions. \u041c\u044b \u0443\u0447\u0438\u043c \u043f\u043b\u0438\u0442\u043a\u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u043f\u043b\u0438\u0442\u043a\u0443 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0441\u0442\u0430\u0440\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0442\u0438\u043a\u0435 \u2014 \u0432 \u043d\u043e\u0432\u043e\u0439.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/538752\/\"> https:\/\/habr.com\/ru\/post\/538752\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437-\u0441\u0435\u0431\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 Rust&#8217;\u043e\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439 \u0432 WASM. \u0411\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0430 \u0447\u0435\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0443\u044e \u0438\u0433\u0440\u0443 <a href=\"https:\/\/github.com\/gabrielecirulli\/2048\" rel=\"nofollow noopener noreferrer\">2048<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rt\/-k\/90\/rt-k901fdr4idddptsxtz2xclo0.png\">  <\/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-316772","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316772","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=316772"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316772\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}