{"id":437,"date":"2024-09-27T22:05:43","date_gmt":"2024-09-27T22:05:43","guid":{"rendered":"https:\/\/xcode15.shimayugu.jp\/?p=437"},"modified":"2024-12-29T07:09:16","modified_gmt":"2024-12-28T22:09:16","slug":"%e6%96%b0swift%e3%81%a7%e8%a1%8c%e3%81%93%e3%81%86%e7%ac%ac%ef%bc%94%ef%bc%96%e5%9b%9e%e3%80%8c%e3%83%90%e3%83%90%e6%8a%9c%e3%81%8d%ef%bc%91%ef%bc%95%e3%80%8d%e3%80%80%e7%94%b0%e9%83%a8","status":"publish","type":"post","link":"https:\/\/xcode15.shimayugu.jp\/?p=437","title":{"rendered":"\u65b0Swift\u3067\u884c\u3053\u3046\u2026\u7b2c\uff14\uff16\u56de\u300c\u30d0\u30d0\u629c\u304d\uff11\uff15\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=918\">\u89e3\u8aac\u7de8<\/a><\/p>\n\n\n\n<p>\u3000\u4f8b\u5916\u3068\u3057\u3066\u524d\u56de\u306f\u8003\u616e\u3057\u306a\u304b\u3063\u305f\u3001\uff11\u756a\u76ee\u3068\uff12\u756a\u76ee\u304c\u9078\u3070\u308c\u305f\u6642\u306e\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u307e\u305f\u3001\u914d\u308a\u76f4\u3057\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u6642\u306b\u3001\u9078\u629e\u7528\u306e\u9752\u30ac\u30a4\u30c9\u304c\u51fa\u3066\u3044\u305f\u3089\u6d88\u3059\u51e6\u7406\u3082\u52a0\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u3001\u5909\u66f4\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=\"4-11,64-68\" data-show-lang=\"1\"><code>    @IBAction func btnGoTouch(_ sender: Any) {\n        share()\n        show()\n        for cardBtn in eachCardButton {\n            cardBtn.removeFromSuperview()\n        }\n        eachCardButton.removeAll()\n        for changeBtn in eachChangeButton {\n            changeBtn.removeFromSuperview()\n        }\n        eachChangeButton.removeAll()\n    }\n    \n    @IBAction func btnPairTouch(_ sender: Any) {\n        var selected = false\n        for i in 0 ..&lt; 4 {\n            if eachButton[i].currentTitle == &quot;\u26ab\ufe0f&quot; {\n                selected = true\n                mine = i\n                break\n            }\n        }\n        if !selected {\n            let alert = UIAlertController()\n            alert.title = &quot;\u9078\u629e&quot;\n            alert.message = &quot;\uff14\u7d44\u306e\u3046\u3061\u306e\u3069\u308c\u304b\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\u3002&quot;\n            alert.addAction(UIAlertAction(title: &quot;OK&quot;, style: .default))\n            present(alert, animated: true, completion: nil)\n            return\n        }\n        btnEnable = false\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        }\n        show()\n        step = 0\n        if mine == 0 {\n            btnChangeTouch()\n        } else if mine == 1 {\n            get()\n        }\n    }<\/code><\/pre><\/div>\n\n\n\n<p>\u3000\u3055\u3066\u3001\u6b21\u56de\u306f\u30ab\u30fc\u30c9\u304c\u7121\u304f\u306a\u3063\u3066\u3001\u3042\u304c\u3063\u305f\u4eba\u306b\u9806\u4f4d\u3092\u4ed8\u3051\u3066\u3001\u30b2\u30fc\u30e0\u304b\u3089\u306f\u629c\u3051\u308b\u51e6\u7406\u3092\u52a0\u3048\u307e\u3059\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=918\">\u89e3\u8aac\u7de8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b21\u3000\u89e3\u8aac\u7de8 \u3000\u4f8b\u5916\u3068\u3057\u3066\u524d\u56de\u306f\u8003\u616e\u3057\u306a\u304b\u3063\u305f\u3001\uff11\u756a\u76ee\u3068\uff12\u756a\u76ee\u304c\u9078\u3070\u308c\u305f\u6642\u306e\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u3000\u307e\u305f\u3001\u914d\u308a\u76f4\u3057\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u6642\u306b\u3001\u9078\u629e\u7528\u306e\u9752\u30ac\u30a4\u30c9\u304c\u51fa\u3066\u3044\u305f\u3089\u6d88\u3059\u51e6\u7406\u3082\u52a0\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u3001\u5909\u66f4\u90e8\u5206\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u3059\u3002 \u3000 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-437","post","type-post","status-publish","format-standard","hentry","category-swift"],"_links":{"self":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/437","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=437"}],"version-history":[{"count":8,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions"}],"predecessor-version":[{"id":1042,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions\/1042"}],"wp:attachment":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}