{"id":20417,"date":"2023-10-06T18:30:00","date_gmt":"2023-10-06T09:30:00","guid":{"rendered":"https:\/\/itport.cloud\/?p=20417"},"modified":"2024-03-27T17:42:05","modified_gmt":"2024-03-27T08:42:05","slug":"post-20417","status":"publish","type":"post","link":"https:\/\/itport.cloud\/?p=20417","title":{"rendered":"Java\u521d\u5fc3\u8005\u3000\u30aa\u30bb\u30ed\u3092\u4f5c\u3063\u3066\u307f\u305f\uff08\u7b2c\uff12\u56de\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"e79baee6aca1-1\">  \u76ee\u6b21 <\/h2>\n\n\n\n<p><a href=\"#\u2460\">\u306f\u3058\u3081\u306b<\/a><br><a href=\"#\u2461\">\u30af\u30e9\u30b9\u306e\u8ffd\u52a0<\/a><br><a href=\"#\u2462\">\u30b3\u30de\u3092\u7f6e\u304f\u305f\u3081\u306e\u5ea7\u6a19\u5165\u529b\u3092\u4f5c\u6210<\/a><br><a href=\"#\u2463\">\u5165\u529b\u3057\u305f\u5024\u304b\u3089\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u914d\u7f6e\u3059\u308b<\/a><br><a href=\"#\u2464\">\u304a\u308f\u308a\u306b<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u2460\"> \u306f\u3058\u3081\u306b <\/h2>\n\n\n\n<p>Java\u3092\u5b66\u3073\u59cb\u3081\u3066\u6570\u304b\u6708\u306e\u79c1\u304cJava\u3067\u30aa\u30bb\u30ed\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>\u524d\u56de\u306f\u30aa\u30bb\u30ed\u306e\u30b9\u30bf\u30fc\u30c8\u6642\u70b9\u3092\u8868\u793a\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u5b8c\u6210\u3057\u307e\u3057\u305f\uff01<br>\u4eca\u56de\u306f\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u7f6e\u304f\u3053\u3068\u3092\u76ee\u6307\u3057\u307e\u3059\uff01<br>\u30d7\u30ec\u30a4\u30e4\u30fc\u304c\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\uff01<br>\u305d\u308c\u3067\u306f\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\uff01\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u2461\"> \u30af\u30e9\u30b9\u306e\u8ffd\u52a0 <\/h2>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u30af\u30e9\u30b9\u3092\u524d\u56de\u4f5c\u6210\u3057\u305f\u3082\u306e\u306b\u8ffd\u52a0\u3057\u3066\u4f5c\u6210\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>\u4eca\u56de\u306f\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\u51e6\u7406\u3092\u8a18\u8f09\u3057\u3066\u3044\u304d\u305f\u3044\u306e\u3067\u4e0b\u8a18\u753b\u50cf\u306e\u3088\u3046\u306b\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2023\/03\/2023-03-23_18h00_04-2.png\" alt=\"\" class=\"wp-image-20422\" width=\"560\" height=\"326\"\/><\/figure>\n\n\n\n<p>config\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u914d\u4e0b\u306b\u300cReverse\u30af\u30e9\u30b9\u300d\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\uff01<br>\u3067\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u2462\"> \u30b3\u30de\u3092\u7f6e\u304f\u305f\u3081\u306e\u5ea7\u6a19\u5165\u529b\u3092\u4f5c\u6210 <\/h2>\n\n\n\n<p>\u4eca\u56de\u3001\u30d7\u30ec\u30a4\u30e4\u30fc\u306b\u30b3\u30de\u3092\u7f6e\u3044\u3066\u3082\u3089\u3046\u65b9\u6cd5\u3068\u3057\u3066\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u30b3\u30de\u3092\u7f6e\u304f\u5ea7\u6a19\u3092\u5165\u529b\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\u305d\u306e\u305f\u3081\u306b\u3001\u521d\u3081\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3057\u305f\u5185\u5bb9\u3092\u53d7\u3051\u4ed8\u3051\u308b\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<br>\u4ee5\u524d\u4f5c\u6210\u3057\u305f\u3001Main\u30af\u30e9\u30b9\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; auto-links: false; highlight: [5,12,13,14,21,29,30,31,32,33,34]; title: ; notranslate\" title=\"\">\npackage osero;\n\nimport osero.config.Start;\nimport osero.view.Board;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\t\/\/\u30dc\u30fc\u30c9\u306e\u60c5\u5831\n\tpublic static String board&#x5B;]&#x5B;] = new String&#x5B;8]&#x5B;8];\n\t\n\t\/\/\u30b3\u30de\u306e\u7f6e\u304f\u305f\u3081\u306b\u5165\u529b\u3057\u305f\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\n\tpublic static int X;\n\tpublic static int Y;\n\t\n\tpublic static void main(String&#x5B;] args) {\n\t\n\t\t\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\n\t\tBoard BD = new Board();\n\t\tStart ST = new Start();\n\t\tScanner SC = new Scanner(System.in);\n\t\t\n\t\t\/\/\u521d\u671f\u5024\u3092\u8a2d\u5b9a\n\t\tST.initialize();\n\t\tST.boardSetup();\n\t\t\/\/\u30dc\u30fc\u30c9\u3092\u8868\u793a\n\t\tBD.showBoard(board);\n\t\t\n\t\t\/\/X\u5ea7\u6a19\u306e\u5165\u529b\u884c\u3046\n\t\u3000\u3000\u3000\u3000System.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u6a2a\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\u3000\u3000\u3000\u3000X = SC.nextInt();\n\t\t\/\/Y\u5ea7\u6a19\u306e\u5165\u529b\u3092\u884c\u3046\n\t\tSystem.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u7e26\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\u3000\u3000\u3000\u3000Y = SC.nextInt();\n\t}\n\t\n\t\/\/\u30b3\u30de\u306e\u60c5\u5831\n\tpublic static String white = \" \u25cb \";\n\tpublic static String black = \" \u25cf \";\n\tpublic static String empty = \"   \";\n\t\n}\n<\/pre><\/div>\n\n\n<p>\u5148\u307b\u3069\u8aac\u660e\u3057\u305f\u3088\u3046\u306b\u3001\u4eca\u56de\u306f\u30d7\u30ec\u30a4\u30e4\u30fc\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3092\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\u3067\u3059\u306e\u3067\u3001Scanner\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001Scanner\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d7\u30ec\u30a4\u30e4\u30fc\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u306e\u5165\u529b\u3092\u884c\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\u5b9f\u969b\u306bScanner\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\u304c\u5fc5\u8981\u3068\u306a\u308b\u306e\u3067\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u307e\u3057\u305f\u3002<br>Scanner sc = new Scanner(System.in)<br>\u305d\u3057\u3066\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306e\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306bint\u578b\u306e\u5909\u6570\u300cX\u300d\u3068\u300cY\u300d\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br>\u3053\u306e\u5909\u6570\u306b\u3001x\u5ea7\u6a19\u30fby\u5ea7\u6a19\u306e\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br>\u305d\u308c\u305e\u308c\u306e\u5909\u6570\u306bnextint()\u3067\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3001\u5909\u6570\u306b\u5024\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<br><br> \u6b21\u306b\u5148\u307b\u3069\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30de\u3092\u6307\u5b9a\u3057\u305f\u30dc\u30fc\u30c9\u306b\u7f6e\u304f\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br>\u6700\u521d\u306b\u4f5c\u6210\u3057\u305f\u300cReverse\u30af\u30e9\u30b9\u300d\u306b\u4e0b\u8a18\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u307e\u3059 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\npackage osero.config;\n\nimport osero.Main;\n\npublic class Reverse {\n\t\n\t\/\/\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\n\t\tpublic void PutKoma(int x, int y) {\n\t\t\tMain.board&#x5B;x]&#x5B;y] = Main.black;\n\t\t}\n}\n<\/pre><\/div>\n\n\n<p>\u300cPutKoma\u300d\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u53d7\u3051\u53d6\u308a\u3001\u6307\u5b9a\u3055\u308c\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3068\u306a\u308a\u307e\u3059\u3002<br>\u3053\u308c\u3067\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3055\u308c\u305f\u53d7\u3051\u53d6\u308b\u51e6\u7406\u304c\u3067\u304d\u305f\u306e\u3067\u3001Main\u30af\u30e9\u30b9\u306b\u623b\u308a\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u53d7\u3051\u6e21\u3059\u51e6\u7406\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<br>Main\u30af\u30e9\u30b9\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u8a18\u3057\u307e\u3059<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; auto-links: false; highlight: [3,23,38,39,40,41]; title: ; notranslate\" title=\"\">\npackage osero;\n\nimport osero.config.Reverse;\nimport osero.config.Start;\nimport osero.view.Board;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\t\/\/\u30dc\u30fc\u30c9\u306e\u60c5\u5831\n\tpublic static String board&#x5B;]&#x5B;] = new String&#x5B;8]&#x5B;8];\n\t\n\t\/\/\u30b3\u30de\u306e\u7f6e\u304f\u305f\u3081\u306b\u5165\u529b\u3057\u305f\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\n\tpublic static int X;\n\tpublic static int Y;\n\t\n\tpublic static void main(String&#x5B;] args) {\n\t\n\t\t\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\n\t\tBoard BD = new Board();\n\t\tStart ST = new Start();\n\t\tScanner SC = new Scanner(System.in);\n\t\tReverse RV = new Reverse();\n\t\t\n\t\t\/\/\u521d\u671f\u5024\u3092\u8a2d\u5b9a\n\t\tST.initialize();\n\t\tST.boardSetup();\n\t\t\/\/\u30dc\u30fc\u30c9\u3092\u8868\u793a\n\t\tBD.showBoard(board);\n\n\t\t\/\/X\u5ea7\u6a19\u306e\u5165\u529b\u884c\u3046\n\t\tSystem.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u6a2a\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\tX = SC.nextInt();\n\t\t\/\/Y\u5ea7\u6a19\u306e\u5165\u529b\u3092\u884c\u3046\n\t\tSystem.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u7e26\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\tY = SC.nextInt();\n\n\t\t\/\/\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\n\t\tRV.PutKoma(X, Y);\n\t\t\/\/\u30dc\u30fc\u30c9\u3092\u8868\u793a\n\t\tBD.showBoard(board);\n\t}\n\t\n\t\/\/\u30b3\u30de\u306e\u60c5\u5831\n\tpublic static String white = \" \u25cb \";\n\tpublic static String black = \" \u25cf \";\n\tpublic static String empty = \"   \";\n\t\n}\n<\/pre><\/div>\n\n\n<p>Reverse\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u300cRV\u300d\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br>\u6b21\u306b\u4f5c\u6210\u3057\u305fPutKoma\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5f15\u6570\u306bX\u30fbY\u3092\u6e21\u3057\u307e\u3059\u3002<br>\u6307\u5b9a\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u304c\u7f6e\u304b\u308c\u305f\u72b6\u614b\u306e\u30dc\u30fc\u30c9\u8868\u793a\u3059\u308b\u305f\u3081\u306bBD.showBoard(board)\u3092\u8a18\u8f09\u3057\u307e\u3059<br>\u3053\u308c\u3067\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u4f7f\u7528\u3057\u3066\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u7f6e\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u2463\"> \u5165\u529b\u3057\u305f\u5024\u304b\u3089\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u914d\u7f6e\u3059\u308b <\/h2>\n\n\n\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u5165\u529b\u3055\u308c\u308b\u5024\u3092int\u578b\u306b\u3057\u3066\u3044\u308b\u305f\u3081\u6570\u5024\u4ee5\u5916\u304c\u5165\u529b\u3055\u308c\u305f\u6642\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308a\u30b2\u30fc\u30e0\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u30dc\u30fc\u30c9\u306f8\u00d78\u3068\u306a\u308b\u306e\u30671\uff5e8\u3067\u5ea7\u6a19\u5165\u529b\u3092\u884c\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002<br>\u306a\u306e\u3067\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u30671\uff5e8\u304c\u5165\u529b\u3055\u308c\u305f\u6642\u306e\u307f\u306b\u51e6\u7406\u3092\u884c\u3046\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>Main\u30af\u30e9\u30b9\u306b\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; auto-links: false; highlight: [25,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,68]; title: ; notranslate\" title=\"\">\npackage osero;\n\nimport osero.config.Reverse;\nimport osero.config.Start;\nimport osero.view.Board;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\t\/\/\u30dc\u30fc\u30c9\u306e\u60c5\u5831\n\tpublic static String board&#x5B;]&#x5B;] = new String&#x5B;8]&#x5B;8];\n\t\n\t\/\/\u30b3\u30de\u306e\u7f6e\u304f\u305f\u3081\u306b\u5165\u529b\u3057\u305f\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\n\tpublic static int X;\n\tpublic static int Y;\n\t\n\tpublic static void main(String&#x5B;] args) {\n\t\n\t\t\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\n\t\tBoard BD = new Board();\n\t\tStart ST = new Start();\n\t\tScanner SC = new Scanner(System.in);\n\t\tReverse RV = new Reverse();\n\t\t\n\t\tSystem.out.println(\"\u30aa\u30bb\u30ed\u3092\u958b\u59cb\u3057\u307e\u3059\");\n\t\t\n\t\t\/\/\u521d\u671f\u5024\u3092\u8a2d\u5b9a\n\t\tST.initialize();\n\t\tST.boardSetup();\n\t\t\/\/\u30dc\u30fc\u30c9\u3092\u8868\u793a\n\t\tBD.showBoard(board);\n\t\t\n\t\tboolean CheckInputX = true;\n\t\twhile(CheckInputX) {\n\t\t\t\/\/X\u5ea7\u6a19\u306e\u5165\u529b\u884c\u3046\n\t\t\tSystem.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u6a2a\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\ttry {\n\t\t\t\tX = SC.nextInt();\n\t\t\t\tif(1 <= X &#038;&#038; X <= 8) {\n\t\t\t\t\tCheckInputX = false;\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"1~8\u306e\u534a\u89d2\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\t\t}\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(\"\u305d\u306e\u5024\u306f\u7121\u52b9\u3067\u3059\u30021~8\u306e\u534a\u89d2\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\t\tSC.next();\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean CheckInputY = true;\n\t\twhile(CheckInputY) {\n\t\t\t\/\/Y\u5ea7\u6a19\u306e\u5165\u529b\u3092\u884c\u3046\n\t\t\tSystem.out.println(\"\u30b3\u30de\u3092\u7f6e\u304f\u3001\u7e26\u306e\u5ea7\u6a19\u30921~8\u306e\u534a\u89d2\u3067\u5165\u529b\u3092\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\ttry {\n\t\t\t\tY = SC.nextInt();\n\t\t\t\tif(1 <= Y &#038;&#038; Y <= 8) {\n\t\t\t\t\tCheckInputY = false;\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"1~8\u306e\u534a\u89d2\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\t\t}\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(\"\u305d\u306e\u5024\u306f\u7121\u52b9\u3067\u3059\u30021~8\u306e\u534a\u89d2\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\");\n\t\t\t\tSC.next();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\/\/\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\n\t\tRV.PutKoma(X - 1, Y - 1);\n\t\t\n\t\t\/\/\u30dc\u30fc\u30c9\u3092\u8868\u793a\n\t\tBD.showBoard(board);\n\t\t\n\t\tSC.close();\n\t\t\n\t}\n\t\n\t\/\/\u30b3\u30de\u306e\u60c5\u5831\n\tpublic static String white = \" \u25cb \";\n\tpublic static String black = \" \u25cf \";\n\tpublic static String empty = \"   \";\n\t\n}\n<\/pre><\/div>\n\n\n<p>x\u30fby\u5ea7\u6a19\u306e\u305d\u308c\u305e\u308c\u3067\u8a18\u8f09\u3057\u3066\u3044\u308b\u30b3\u30fc\u30c9\u306f\u307b\u3068\u3093\u3069\u540c\u3058\u5185\u5bb9\u3067\u3059\u3002<br>\u9055\u3046\u70b9\u3068\u3057\u3066\u306fboolean\u578b\u3067\u3057\u3066\u3044\u308b\u5909\u6570\u540d\u3092\u300cCheckInputX\u300d\u30fb\u300cCheckInputY\u300d\u3068\u3057\u3066\u3044\u308b\u70b9\u3067\u3059\u3002<br>\u3053\u306e\u5909\u6570\u3092\u4f5c\u6210\u3057\u3066\u3044\u308b\u7406\u7531\u306f\u3001\u305d\u306e\u4e0b\u306b\u8a18\u8f09\u3057\u3066\u3044\u308bwhile\u6587\u3067\u4f7f\u7528\u3059\u308b\u305f\u3081\u3067\u3059\u3002<br>while\u6587\u306f\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u8a18\u8f09\u3092\u3057\u3066\u3044\u307e\u3059\u3002<br>\u4eca\u56de\u306e\u5834\u5408\u3067\u3059\u30681\uff5e8\u306e\u6b63\u3057\u3044\u6570\u5024\u304c\u5165\u529b\u3055\u308c\u308b\u307e\u3067\u3001\u7e70\u308a\u8fd4\u3057\u30d7\u30ec\u30a4\u30e4\u30fc\u306b\u5165\u529b\u3092\u884c\u3046\u3088\u3046\u306b\u6307\u793a\u3059\u308b\u305f\u3081\u306b\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u3002<br>\u305d\u3057\u3066\u3001while\u6587\u306f\u6761\u4ef6\u5f0f\u304cfalse\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u304b\u3089\u629c\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u300cCheckInputX\u300d\u30fb\u300cCheckInputY\u300d\u3092boolean\u578b\u3067true\u3068\u3057\u3066\u304a\u304d\u30011\uff5e8\u304c\u5165\u529b\u3055\u308c\u305f\u6642\u306e\u307f\u306bfalse\u3068\u5909\u6570\u3092\u66f8\u304d\u63db\u3048\u3066\u3001\u51e6\u7406\u304b\u3089\u629c\u3051\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<br>while\u6587\u306e\u4e2d\u306btry-catch\u6587\u3092\u4f7f\u7528\u3057\u3066\u5148\u307b\u3069\u8aac\u660e\u3057\u305f1\uff5e8\u304c\u5165\u529b\u3067\u304d\u308b\u5024\u3068\u6307\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>try\u6587\u306e\u4e2d\u306b\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u6570\u5024\u304c\u5165\u529b\u3055\u308c\u305f\u6642\u306e\u51e6\u7406\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<br>if-else\u6587\u30671\uff5e8\u306e\u5834\u5408\u306f\u51e6\u7406\u3092\u7d42\u4e86\u3067\u304d\u308b\u3088\u3046\u306b\u305d\u308c\u4ee5\u5916\u306e\u6570\u5024\u306e\u6642\u306f1\uff5e8\u306e\u3069\u308c\u304b\u3057\u304b\u5165\u529b\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u3059\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>catch\u6587\u306b\u306f\u6570\u5024\u4ee5\u5916\u304c\u5165\u529b\u3055\u308c\u305f\u3068\u304d\u306b\u30a8\u30e9\u30fc\u3067\u6b62\u307e\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u4f8b\u5916\u51e6\u7406\u3068\u306a\u308b\u3088\u3046\u306b\u8a18\u8f09\u3092\u3057\u307e\u3059\u3002<br>\u6570\u5024\u4ee5\u5916\u304c\u5165\u529b\u3055\u308c\u305f\u3068\u304d\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u6b21\u306e\u5165\u529b\u3092\u884c\u3048\u308b\u3088\u3046\u306bSC.next()\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<br>SC.next()\u3092\u8a18\u8f09\u3057\u306a\u3044\u3068\u7121\u9650\u30eb\u30fc\u30d7\u72b6\u614b\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br>\u6700\u5f8c\u306bPutKoma\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u3092X-1\u30fbY-1\u3068\u3057\u307e\u3059\u3002<br>\u672c\u6765\u3001\u30dc\u30fc\u30c9\u306e\u5ea7\u6a19\u306f0\uff5e7\u304c\u6b63\u3057\u3044\u6570\u5024\u3092\u306a\u308b\u305f\u3081\u5165\u529b\u3055\u308c\u305f\u6570\u5024\u3092\u305d\u306e\u307e\u307e\u5f15\u6570\u3068\u3059\u308b\u30681\u3064\u5ea7\u6a19\u304c\u305a\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u306a\u306e\u3067-1\u3068\u3057\u3066\u5165\u529b\u3055\u308c\u305f\u6570\u5024\u3067\u6307\u5b9a\u3055\u308c\u305f\u6b63\u3057\u3044\u5ea7\u6a19\u3078\u30b3\u30de\u3092\u7f6e\u3051\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\u3053\u308c\u3067\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3067\u304d\u308b\u5024\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u2464\"> \u304a\u308f\u308a\u306b <\/h2>\n\n\n\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/itport.cloud\/wp-content\/uploads\/2023\/03\/2023-03-23_18h20_12.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2023\/03\/2023-03-23_18h20_12.png\" alt=\"\" class=\"wp-image-20421\" width=\"316\" height=\"586\"\/><\/a><\/figure>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u305f\u5ea7\u6a19\u306b\u7121\u4e8b\u30b3\u30de\u3092\u7f6e\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\uff01\uff01<br><br>\u4eca\u56de\u306f\u7121\u9650\u30eb\u30fc\u30d7\u306b\u306a\u3063\u305f\u308a\u3068\u5927\u5909\u3067\u3057\u305f\u304c\u3069\u3046\u306b\u304b\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3088\u304b\u3063\u305f\u3067\u3059<br>\u6b21\u56de\u3082\u3053\u306e\u5f8c\u306e\u51e6\u7406\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"\u76ee\u6b21 \u306f\u3058\u3081\u306b\u30af\u30e9\u30b9\u306e\u8ffd\u52a0\u30b3\u30de\u3092\u7f6e\u304f\u305f\u3081\u306e\u5ea7\u6a19\u5165\u529b\u3092\u4f5c\u6210\u5165\u529b\u3057\u305f\u5024\u304b\u3089\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u914d\u7f6e\u3059\u308b\u304a\u308f\u308a\u306b \u306f\u3058\u3081\u306b Java\u3092\u5b66\u3073\u59cb\u3081\u3066\u6570\u304b\u6708\u306e\u79c1\u304cJava\u3067\u30aa\u30bb\u30ed\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u524d\u56de\u306f\u30aa\u30bb\u30ed\u306e\u30b9\u30bf\u30fc\u30c8\u6642\u70b9\u3092\u8868\u793a\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u5b8c\u6210\u3057\u307e\u3057\u305f\uff01\u4eca\u56de\u306f\u30dc\u30fc\u30c9\u306b\u30b3\u30de\u3092\u7f6e\u304f\u3053\u3068\u3092\u76ee\u6307\u3057\u307e\u3059\uff01\u30d7\u30ec\u30a4\u30e4\u30fc\u304c\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\uff01\u305d\u308c\u3067\u306f\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\uff01\uff01 \u30af\u30e9\u30b9\u306e\u8ffd\u52a0 \u307e\u305a\u306f\u3001\u30af\u30e9\u30b9\u3092\u524d\u56de\u4f5c\u6210\u3057\u305f\u3082\u306e\u306b\u8ffd\u52a0\u3057\u3066\u4f5c\u6210\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u5165\u529b\u3057\u305f\u5ea7\u6a19\u306b\u30b3\u30de\u3092\u7f6e\u304f\u51e6\u7406\u3092\u8a18\u8f09\u3057\u3066\u3044\u304d\u305f\u3044\u306e\u3067\u4e0b\u8a18\u753b\u50cf\u306e\u3088\u3046\u306b\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 config\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u914d\u4e0b\u306b\u300cReverse\u30af\u30e9\u30b9\u300d\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\uff01\u3067\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u306b\u30b3&hellip;","protected":false},"author":34,"featured_media":20676,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[151],"class_list":{"0":"post-20417","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-java","8":"tag-season51"},"_links":{"self":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/20417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20417"}],"version-history":[{"count":10,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/20417\/revisions"}],"predecessor-version":[{"id":21206,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/20417\/revisions\/21206"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/media\/20676"}],"wp:attachment":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}