{"id":366,"date":"2024-09-20T23:42:10","date_gmt":"2024-09-20T23:42:10","guid":{"rendered":"https:\/\/xcode15.shimayugu.jp\/?p=366"},"modified":"2024-12-29T06:58:30","modified_gmt":"2024-12-28T21:58:30","slug":"%e6%96%b0swift%e3%81%a7%e8%a1%8c%e3%81%93%e3%81%86%e7%ac%ac%ef%bc%93%ef%bc%94%e5%9b%9e%e3%80%8c%e3%83%90%e3%83%90%e6%8a%9c%e3%81%8d%ef%bc%93%e3%80%8d%e3%80%80%e7%94%b0%e9%83%a8%e4%ba%95","status":"publish","type":"post","link":"https:\/\/xcode15.shimayugu.jp\/?p=366","title":{"rendered":"\u65b0Swift\u3067\u884c\u3053\u3046\u2026\u7b2c\uff13\uff14\u56de\u300c\u30d0\u30d0\u629c\u304d\uff13\u300d\u3000\u7530\u90e8\u4e95\u4fdd"},"content":{"rendered":"\n<p><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2473\">\u76ee\u6b21<\/a>\u3000<a href=\"https:\/\/xcode15.shimayugu.jp\/?p=814\">\u89e3\u8aac\u7de8<\/a><\/p>\n\n\n\n<p>\u3000\u4eca\u56de\u306f\u30da\u30a2\u306b\u306a\u3063\u305f\u30ab\u30fc\u30c9\u3092\u9664\u304f\u51e6\u7406\u3067\u3059\u3002\u4ed6\u306e\u4eba\u306e\u30ab\u30fc\u30c9\u306f\u4f0f\u305b\u3066\u884c\u3046\u306e\u3067\u3059\u304c\u3001\u4eca\u306f\u3001\u304d\u3061\u3093\u3068\u51e6\u7406\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u304b\u3081\u308b\u70ba\u3001\u8868\u306b\u3057\u3066\u8868\u793a\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u3044\u304d\u306a\u308a\u5168\u90e8\u306e\u51e6\u7406\u3092\u884c\u3046\u306e\u306f\u96e3\u3057\u3044\u306e\u3067\u3001\u307e\u305a\u30da\u30a2\u306b\u306a\u3063\u3066\u3044\u308b\u30ab\u30fc\u30c9\u3092\u6d88\u3059\u3068\u3044\u3046\u51e6\u7406\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u4ee5\u4e0b\u3001\u8ffd\u52a0\u90e8\u5206\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-swift\" data-lang=\"Swift\" data-show-lang=\"1\"><code>    @IBAction func btnPairTouch(_ sender: Any) {\n        for i in 0 ..&lt; 4 {\n            for j in 0 ..&lt; 13 {\n                if (eachCard[i][j].tag == 52) || (eachCard[i][j].tag == -1) {\n                    continue\n                }\n                for k in j + 1 ..&lt; 14 {\n                    if (eachCard[i][k].tag == 52) || (eachCard[i][k].tag == -1) {\n                        continue\n                    }\n                    if (eachCard[i][j].tag % 13) == (eachCard[i][k].tag % 13) {\n                        eachCard[i][j].tag = -1\n                        eachCard[i][k].tag = -1\n                        break\n                    }\n                }\n            }\n            for j in 0 ..&lt; 14 {\n                if eachCard[i][j].tag &gt;= 0 {\n                    eachCard[i][j].text = cardObj.disp(card: eachCard[i][j].tag)\n                } else {\n                    eachCard[i][j].text = &quot;\u3000&quot;\n                }\n            }\n        }\n    }<\/code><\/pre><\/div>\n\n\n\n<p>\u3000\u5b9f\u884c\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002\u30ab\u30fc\u30c9\u304c\u6d88\u3055\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u7d9a\u3044\u3066\u3001\u8a70\u3081\u308b\u51e6\u7406\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u3001\u554f\u984c\u90e8\u5206\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-swift\" data-lang=\"Swift\" data-line=\"18-30\" data-show-lang=\"1\"><code>    @IBAction func btnPairTouch(_ sender: Any) {\n        for i in 0 ..&lt; 4 {\n            for j in 0 ..&lt; 13 {\n                if (eachCard[i][j].tag == 52) || (eachCard[i][j].tag == -1) {\n                    continue\n                }\n                for k in j + 1 ..&lt; 14 {\n                    if (eachCard[i][k].tag == 52) || (eachCard[i][k].tag == -1) {\n                        continue\n                    }\n                    if (eachCard[i][j].tag % 13) == (eachCard[i][k].tag % 13) {\n                        eachCard[i][j].tag = -1\n                        eachCard[i][k].tag = -1\n                        break\n                    }\n                }\n            }\n            var find = false\n            var k = 0\n            for j in 0 ..&lt; 14 {\n                if eachCard[i][j].tag == -1 {\n                    find = true\n                } else {\n                    if find {\n                        eachCard[i][k].tag = eachCard[i][j].tag\n                        eachCard[i][j].tag = -1\n                    }\n                    k += 1\n                }\n            }\n            for j in 0 ..&lt; 14 {\n                if eachCard[i][j].tag &gt;= 0 {\n                    eachCard[i][j].text = cardObj.disp(card: eachCard[i][j].tag)\n                } else {\n                    eachCard[i][j].text = &quot;\u3000&quot;\n                }\n            }\n        }\n    }\n<\/code><\/pre><\/div>\n\n\n\n<p>\u3000\u4e0a\u624b\u304f\u884c\u304d\u307e\u3057\u305f\u304b\u3002<\/p>\n\n\n\n<p>\u3000\u672c\u6765\u3001\u6700\u521d\u306b\u30ab\u30fc\u30c9\u3092\u4f0f\u305b\u3066\u51fa\u3057\u305f\u6642\u306b\u3001\u30ab\u30fc\u30c9\u304c\u914d\u3089\u308c\u308b\u3079\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u6b21\u56de\u306f\u6700\u521d\u304b\u3089\u30ab\u30fc\u30c9\u304c\u914d\u3089\u308c\u308b\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u5909\u66f4\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2473\">\u76ee\u6b21<\/a>\u3000<a href=\"https:\/\/xcode15.shimayugu.jp\/?p=814\">\u89e3\u8aac\u7de8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b21\u3000\u89e3\u8aac\u7de8 \u3000\u4eca\u56de\u306f\u30da\u30a2\u306b\u306a\u3063\u305f\u30ab\u30fc\u30c9\u3092\u9664\u304f\u51e6\u7406\u3067\u3059\u3002\u4ed6\u306e\u4eba\u306e\u30ab\u30fc\u30c9\u306f\u4f0f\u305b\u3066\u884c\u3046\u306e\u3067\u3059\u304c\u3001\u4eca\u306f\u3001\u304d\u3061\u3093\u3068\u51e6\u7406\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u304b\u3081\u308b\u70ba\u3001\u8868\u306b\u3057\u3066\u8868\u793a\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002 \u3000\u3044\u304d\u306a\u308a\u5168\u90e8\u306e\u51e6\u7406\u3092\u884c\u3046\u306e\u306f\u96e3\u3057\u3044\u306e\u3067\u3001\u307e\u305a\u30da\u30a2\u306b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-366","post","type-post","status-publish","format-standard","hentry","category-swift"],"_links":{"self":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=366"}],"version-history":[{"count":7,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions"}],"predecessor-version":[{"id":1029,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions\/1029"}],"wp:attachment":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}