{"id":27189,"date":"2024-11-24T16:47:04","date_gmt":"2024-11-24T08:47:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27189\/"},"modified":"2024-11-24T16:47:04","modified_gmt":"2024-11-24T08:47:04","slug":"%e4%ba%94%e5%ad%90%e6%a3%8b%e6%9c%ba%e5%99%a8%e4%ba%ba%e4%bb%a3%e7%a0%81%e4%bc%98%e5%8c%96%ef%bc%9a%e5%a6%82%e4%bd%95%e7%ae%80%e5%8c%96%e9%87%8d%e5%a4%8d%e4%bb%a3%e7%a0%81%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27189\/","title":{"rendered":"\u4e94\u5b50\u68cb\u673a\u5668\u4eba\u4ee3\u7801\u4f18\u5316\uff1a\u5982\u4f55\u7b80\u5316\u91cd\u590d\u4ee3\u7801\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173120760442601.jpg\" class=\"aligncenter\" title=\"\u4e94\u5b50\u68cb\u673a\u5668\u4eba\u4ee3\u7801\u4f18\u5316\uff1a\u5982\u4f55\u7b80\u5316\u91cd\u590d\u4ee3\u7801\uff1f\u63d2\u56fe\" alt=\"\u4e94\u5b50\u68cb\u673a\u5668\u4eba\u4ee3\u7801\u4f18\u5316\uff1a\u5982\u4f55\u7b80\u5316\u91cd\u590d\u4ee3\u7801\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e94\u5b50\u68cb\u673a\u5668\u4eba,\u7b80\u5316\u4ee3\u7801<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u6211\u82b1\u4e86\u51e0\u5929\u7684\u65f6\u95f4\u7528\u5199\u4e86\u4e00\u4e2a\u4e94\u5b50\u68cb\uff0c\u4e0e\u673a\u5668\u4eba\u5bf9\u6218<\/p>\n<p>\u4f46\u662f\u6211\u611f\u89c9\u91cc\u9762\u4ee3\u7801\u5f88\u591a\u91cd\u590d\u7684\u90e8\u5206\uff0c\u60f3\u8981\u7b80\u5316\u5199\u6cd5\uff0c\u5e0c\u671b\u5927\u5bb6\u5e2e\u6211\u770b\u770b<\/p>\n<p><strong>\u91cd\u590d\u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>function airPoint() {\n\n  \/\/\u673a\u5668\u4eba\u56db\u4e2a\u8fde\u5728\u4e86\u4e00\u8d77\uff0c\u90a3\u5e94\u8be5\u8981\u653e\u56db\u4e2a\u65c1\u8fb9\n  console.log(fourDetial, 'fourDetial')\n  if (fourDetial &amp;&amp; JSON.stringify(fourDetial) !== '{}') {\n\n    if (fourDetial.type === 1) {\n      if (fourDetial.geyi) {\n        for (let i = fourDetial.x; i &gt; fourDetial.x - fourDetial.times + 1; i--) {\n          if (boxs.value[i][fourDetial.y].place === 0) {\n            boxs.value[i][fourDetial.y].place = 2\n            fourDetial = determineEquare3(4, 2, { x: i, y: fourDetial.y, place: 2 })\n            airPlace.push((i) * row.value + fourDetial.y)\n            curUser.value = 1\n            return\n          }\n        }\n      }\n      else\n        if (boxs.value[fourDetial.x + 1]?.[fourDetial.y]?.place === 0) {\n          boxs.value[fourDetial.x + 1][fourDetial.y].place = 2\n          fourDetial = determineEquare3(4, 2, { x: fourDetial.x + 1, y: fourDetial.y, place: 2 })\n          airPlace.push((fourDetial.x + 1) * row.value + fourDetial.y)\n          curUser.value = 1\n          return\n        } else if (boxs.value[fourDetial.x - fourDetial.times]?.[fourDetial.y]?.place === 0) {\n          boxs.value[fourDetial.x - fourDetial.times][fourDetial.y].place = 2\n          fourDetial = determineEquare3(4, 2, { x: fourDetial.x - fourDetial.times, y: fourDetial.y, place: 2 })\n          airPlace.push((fourDetial.x - fourDetial.times) * row.value + fourDetial.y)\n\n          curUser.value = 1\n          return\n        }\n    } else if (fourDetial.type === 2) {\n      if (fourDetial.geyi) {\n        for (let j = fourDetial.y; j &gt; fourDetial.y - fourDetial.times + 1; j--) {\n          if (boxs.value[fourDetial.x][j].place === 0) {\n            boxs.value[fourDetial.x][j].place = 2\n            fourDetial = determineEquare3(4, 2, { x: fourDetial.x, y: j, place: 2 })\n            airPlace.push((fourDetial.x) * row.value + j)\n            curUser.value = 1\n            return\n          }\n        }\n      }\n      else if (boxs.value[fourDetial.x]?.[fourDetial.y + 1]?.place === 0) {\n        boxs.value[fourDetial.x][fourDetial.y + 1].place = 2\n        fourDetial = determineEquare3(4, 2, { x: fourDetial.x, y: fourDetial.y + 1, place: 2 })\n        airPlace.push((fourDetial.x) * row.value + fourDetial.y + 1)\n\n        curUser.value = 1\n        return\n      } else if (boxs.value[fourDetial.x]?.[fourDetial.y - fourDetial.times]?.place === 0) {\n        boxs.value[fourDetial.x][fourDetial.y - fourDetial.times].place = 2\n        fourDetial = determineEquare3(4, 2, { x: fourDetial.x, y: fourDetial.y - fourDetial.times, place: 2 })\n        airPlace.push((fourDetial.x) * row.value + fourDetial.y - fourDetial.times)\n\n        curUser.value = 1\n        return\n      }\n    } else if (fourDetial.type === 3) {\n      if (fourDetial.geyi) {\n        let i\n        for (let j = fourDetial.y - 1; j &gt; fourDetial.y - fourDetial.times + 1; j--) {\n          i = fourDetial.x - (fourDetial.y - j)\n          if (boxs.value[i]?.[j]?.place === 0) {\n            boxs.value[i][j].place = 2\n            fourDetial = determineEquare3(4, 2, { x: i, y: j, place: 2 })\n            airPlace.push((i) * row.value + j)\n            curUser.value = 1\n            return\n          }\n        }\n      }\n      else\n        if (boxs.value[fourDetial.x + 1]?.[fourDetial.y + 1]?.place === 0) {\n          boxs.value[fourDetial.x + 1][fourDetial.y + 1].place = 2\n          fourDetial = determineEquare3(4, 2, { x: fourDetial.x + 1, y: fourDetial.y + 1, place: 2 })\n          airPlace.push((fourDetial.x + 1) * row.value + fourDetial.y + 1)\n\n          curUser.value = 1\n          return\n        } else if (boxs.value[fourDetial.x - fourDetial.times]?.[fourDetial.y - fourDetial.times]?.place === 0) {\n          boxs.value[fourDetial.x - fourDetial.times][fourDetial.y - fourDetial.times].place = 2\n          fourDetial = determineEquare3(4, 2, { x: fourDetial.x - fourDetial.times, y: fourDetial.y - fourDetial.times, place: 2 })\n          airPlace.push((fourDetial.x - fourDetial.times) * row.value + fourDetial.y - fourDetial.times)\n\n          curUser.value = 1\n          return\n        }\n    } else if (fourDetial.type === 4) {\n      if (fourDetial.geyi) {\n        let i\n        for (let j = fourDetial.y; j &lt; fourDetial.y + fourDetial.times - 1; j++) {\n          i = fourDetial.x - (j - fourDetial.y)\n          if (boxs.value[i]?.[j]?.place === 0) {\n            boxs.value[i][j].place = 2\n            fourDetial = determineEquare3(4, 2, { x: i, y: j, place: 2 })\n            airPlace.push((i) * row.value + j)\n            curUser.value = 1\n            return\n          }\n        }\n      }\n      else if (boxs.value[fourDetial.x + 1]?.[fourDetial.y - 1]?.place === 0) {\n        boxs.value[fourDetial.x + 1][fourDetial.y - 1].place = 2\n        fourDetial = determineEquare3(4, 2, { x: fourDetial.x + 1, y: fourDetial.y - 1, place: 2 })\n        airPlace.push((fourDetial.x + 1) * row.value + fourDetial.y - 1)\n        curUser.value = 1\n        return\n      } else if (boxs.value[fourDetial.x - fourDetial.times]?.[fourDetial.y + fourDetial.times]?.place === 0) {\n        boxs.value[fourDetial.x - fourDetial.times][fourDetial.y + fourDetial.times].place = 2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e94\u5b50\u68cb\u673a\u5668\u4eba\u4ee3\u7801\u4f18\u5316\uff1a\u5982\u4f55\u7b80\u5316\u91cd\u590d\u4ee3\u7801\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e94\u5b50\u68cb\u673a\u5668\u4eba,\u7b80\u5316\u4ee3\u7801 \u95ee\u9898\uff1a \u6211\u82b1\u4e86\u51e0\u5929\u7684\u65f6\u95f4\u7528\u5199\u4e86\u4e00\u4e2a\u4e94\u5b50\u68cb\uff0c\u4e0e\u673a\u5668\u4eba\u5bf9\u6218 \u4f46\u662f\u6211\u611f\u89c9\u91cc\u9762\u4ee3\u7801\u5f88\u591a\u91cd\u590d\u7684\u90e8\u5206\uff0c\u60f3\u8981\u7b80\u5316\u5199\u6cd5\uff0c\u5e0c\u671b\u5927\u5bb6\u5e2e\u6211\u770b\u770b \u91cd\u590d\u4ee3\u7801\uff1a function airPoint() { \/\/\u673a\u5668\u4eba\u56db\u4e2a\u8fde\u5728\u4e86\u4e00\u8d77\uff0c\u90a3\u5e94\u8be5\u8981\u653e\u56db\u4e2a\u65c1\u8fb9 console.log(fourDetial, &#8216;fourDetial&#8217;) if (fourDetial &amp;&amp; JSON.stringify(fourDetial) !== &#8216;{}&#8217;) { if (fourDetial.type === 1) { if (fourDetial.geyi) { for (let i = fourDetial.x; i &gt; fourDetial.x &#8211; fourDetial.times + 1; i&#8211;) { if (boxs.value[i][fourDetial.y].place === 0) { boxs.value[i][fourDetial.y].place = 2 fourDetial = determineEquare3(4, 2, { x: i, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27189","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27189"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27189\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}