{"id":106,"date":"2024-05-19T13:46:58","date_gmt":"2024-05-19T04:46:58","guid":{"rendered":"http:\/\/yamweb.com\/blockly\/wp\/?p=106"},"modified":"2024-05-22T12:10:12","modified_gmt":"2024-05-22T03:10:12","slug":"blockly-games-pond-s-javascript-code","status":"publish","type":"post","link":"https:\/\/wp.yamweb.com\/blockly\/index.php\/2024\/05\/19\/blockly-games-pond-s-javascript-code\/","title":{"rendered":"Blockly Games : Pond &#8216;S Javascript CODE"},"content":{"rendered":"\n<p>\u58c1\u306b\u8fd1\u3044\u3068\u56de\u907f\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var angle;\n\nangle = 200;\nwhile (true) {\n  if (scan(angle) &gt; 70) {\n    swim(angle);\n  }\n  if (scan(angle) &lt;= 70) {\n    cannon(angle, scan(angle));\n  }\n  if (scan(angle) &gt; 70) {\n    angle += 4;\n    if (angle &gt; 360) {\n      angle = 0;\n    }\n  }\n  if (scan(angle) &lt;= 30) {\n    angle += 80;\n    if (angle &gt; 360) {\n      angle = 180;\n    }\n  }\n  if (getY() &lt; 5) {\n    angle = 90;\n    swim(angle)\n  }\n  if (getY() &gt; 65) {\n    angle = 270;\n    swim(angle)\n  }\n  if (getX() &lt; 5) {\n    angle = 0;\n    swim(angle)\n  }\n  if (getX() &gt; 65) {\n    angle = 180;\n    swim(angle)\n  }\n }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u58c1\u306b\u8fd1\u3044\u3068\u56de\u907f\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-106","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-blockly"],"_links":{"self":[{"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":2,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/posts\/106\/revisions\/123"}],"wp:attachment":[{"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.yamweb.com\/blockly\/index.php\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}