{"id":3926,"date":"2024-11-10T14:46:20","date_gmt":"2024-11-10T06:46:20","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3926\/"},"modified":"2024-11-10T14:46:20","modified_gmt":"2024-11-10T06:46:20","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e4%bb%a3%e7%a0%81%e4%b8%ad%e7%9a%84%e9%87%8d%e5%a4%8d%e9%83%a8%e5%88%86%e6%8b%86%e5%88%86%e6%88%90%e6%9b%b4%e5%b0%8f%e7%9a%84%e5%87%bd%e6%95%b0%ef%bc%8c%e4%bb%a5%e6%8f%90","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3926\/","title":{"rendered":"\u5982\u4f55\u5c06\u4ee3\u7801\u4e2d\u7684\u91cd\u590d\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u53ef\u7ef4\u62a4\u6027\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173119736537945.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5c06\u4ee3\u7801\u4e2d\u7684\u91cd\u590d\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u53ef\u7ef4\u62a4\u6027\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5c06\u4ee3\u7801\u4e2d\u7684\u91cd\u590d\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u53ef\u7ef4\u62a4\u6027\uff1f\u63d2\u56fe\" \/><\/p>\n<blockquote><p>\n  \u5982\u4f55\u7b80\u5316\u4ee3\u7801\u4e2d\u91cd\u590d\u7684\u90e8\u5206\uff1f\n<\/p><\/blockquote>\n<p>\u5728\u4f60\u7ed9\u51fa\u7684\u4ee3\u7801\u4e2d\uff0cclickbox \u548c aripoint \u4e2d\u5b58\u5728\u4e00\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u3002\u4f60\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li> <strong>\u653e\u7f6e\u68cb\u5b50\uff1a<\/strong>\u521b\u5efa\u4e00\u4e2a placePiece \u51fd\u6570\uff0c\u7528\u4e8e\u5728\u6307\u5b9a\u4f4d\u7f6e\u653e\u7f6e\u68cb\u5b50\u3002<\/li>\n<li> <strong>\u68c0\u67e5\u4f4d\u7f6e\uff1a<\/strong>\u521b\u5efa\u4e00\u4e2a checkAndPlace \u51fd\u6570\uff0c\u7528\u4e8e\u68c0\u67e5\u6307\u5b9a\u4f4d\u7f6e\u662f\u5426\u53ef\u4ee5\u653e\u7f6e\u68cb\u5b50\u5e76\u653e\u7f6e\u68cb\u5b50\u3002<\/li>\n<li> <strong>\u5224\u65ad\u8fde\u5b50\u60c5\u51b5\uff1a<\/strong>\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u51fd\u6570\u6765\u5224\u65ad\u8fde\u5b50\u7684\u60c5\u51b5\uff0c\u5e76\u6839\u636e\u60c5\u51b5\u91c7\u53d6\u4e0d\u540c\u7684\u884c\u52a8\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u5c06\u8fd9\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee3\u7801\u5c06\u53d8\u5f97\u66f4\u52a0\u6a21\u5757\u5316\u548c\u6613\u4e8e\u7ef4\u62a4\u3002<\/p>\n<p><strong>\u4f18\u5316\u540e\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/strong><\/p>\n<pre>function placePiece(x, y) {\n  boxs.value[x][y].place = 2;\n  fourDetial = determineEquare3(4, 2, { x, y, place: 2 });\n  airPlace.push(x * row.value + y);\n}\n\nfunction checkAndPlace(x, y) {\n  if (boxs.value[x]?.[y]?.place === 0) {\n    placePiece(x, y);\n    curUser.value = 1;\n    return true;\n  }\n  return false;\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>function placeFourStopUser(x, y, times) {\n  if (boxs.value[x]?.[y]?.place === 0) {\n    placePiece(x, y);\n    curUser.value = 1;\n    return true;\n  }\n  return false;\n}\n\nfunction placeFiveSelf() {\n  \/\/ ...\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>function ariPoint() {\n  \/\/ \u68c0\u67e5\u662f\u5426\u6709\u56db\u4e2a\u8fde\u5728\u4e00\u8d77\u7684\u60c5\u51b5\n  if (!isEmptyObject(fourDetial)) {\n    \/\/ ...\n  }\n\n  \/\/ \u68c0\u67e5\u662f\u5426\u6709\u963b\u6321\u7528\u6237\u7684\u60c5\u51b5\n  const temp = determineEquare3();\n  if (temp) {\n    \/\/ ...\n  } else {\n    \/\/ \u4f01\u56fe\u5b8c\u6210\u4e94\u4e2a\u8fde\u7ebf\n    \/\/ ...\n  }\n\n  curUser.value = 1;\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5c06\u4ee3\u7801\u4e2d\u7684\u91cd\u590d\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u53ef\u7ef4\u62a4\u6027\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>\u5982\u4f55\u7b80\u5316\u4ee3\u7801\u4e2d\u91cd\u590d\u7684\u90e8\u5206\uff1f \u5728\u4f60\u7ed9\u51fa\u7684\u4ee3\u7801\u4e2d\uff0cclickbox \u548c aripoint \u4e2d\u5b58\u5728\u4e00\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u3002\u4f60\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4f8b\u5982\uff1a \u653e\u7f6e\u68cb\u5b50\uff1a\u521b\u5efa\u4e00\u4e2a placePiece \u51fd\u6570\uff0c\u7528\u4e8e\u5728\u6307\u5b9a\u4f4d\u7f6e\u653e\u7f6e\u68cb\u5b50\u3002 \u68c0\u67e5\u4f4d\u7f6e\uff1a\u521b\u5efa\u4e00\u4e2a checkAndPlace \u51fd\u6570\uff0c\u7528\u4e8e\u68c0\u67e5\u6307\u5b9a\u4f4d\u7f6e\u662f\u5426\u53ef\u4ee5\u653e\u7f6e\u68cb\u5b50\u5e76\u653e\u7f6e\u68cb\u5b50\u3002 \u5224\u65ad\u8fde\u5b50\u60c5\u51b5\uff1a\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u51fd\u6570\u6765\u5224\u65ad\u8fde\u5b50\u7684\u60c5\u51b5\uff0c\u5e76\u6839\u636e\u60c5\u51b5\u91c7\u53d6\u4e0d\u540c\u7684\u884c\u52a8\u3002 \u901a\u8fc7\u5c06\u8fd9\u4e9b\u91cd\u590d\u7684\u90e8\u5206\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u51fd\u6570\uff0c\u4ee3\u7801\u5c06\u53d8\u5f97\u66f4\u52a0\u6a21\u5757\u5316\u548c\u6613\u4e8e\u7ef4\u62a4\u3002 \u4f18\u5316\u540e\u7684\u4ee3\u7801\u793a\u4f8b\uff1a function placePiece(x, y) { boxs.value[x][y].place = 2; fourDetial = determineEquare3(4, 2, { x, y, place: 2 }); airPlace.push(x * row.value + y); } function checkAndPlace(x, y) { if (boxs.value[x]?.[y]?.place === 0) { placePiece(x, y); curUser.value = 1; return true; } return [&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-3926","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3926","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=3926"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3926\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}