{"id":31,"date":"2021-07-19T13:55:27","date_gmt":"2021-07-19T04:55:27","guid":{"rendered":"http:\/\/kpc2021vb.satoshis.jp\/?p=31"},"modified":"2021-07-19T14:02:55","modified_gmt":"2021-07-19T05:02:55","slug":"%e6%b6%88%e3%81%88%e3%81%ab%e3%81%8f%e3%81%84%e3%83%96%e3%83%ad%e3%83%83%e3%82%af%e3%82%92%e4%bd%9c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/kpcvb.satoshis.jp\/?p=31","title":{"rendered":"\u6d88\u3048\u306b\u304f\u3044\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u308b"},"content":{"rendered":"<div class=\"52c85d4ba9991f085df6225e35c53991\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- memo300x600 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:inline-block;width:300px;height:600px\"\r\n     data-ad-client=\"ca-pub-9576179666165228\"\r\n     data-ad-slot=\"1090285404\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<p>\u73fe\u5728\u306f\u30dc\u30fc\u30eb\u304c\u30d6\u30ed\u30c3\u30af\u306b\u4e00\u5ea6\u3060\u3051\u5f53\u305f\u308c\u3070\u30d6\u30ed\u30c3\u30af\u306f\u6d88\u3048\u307e\u3059\u304c\u3001\u8907\u6570\u56de\u5f53\u305f\u3089\u306a\u3044\u3068\u6d88\u3048\u306a\u3044\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30d6\u30ed\u30c3\u30af\u306e\u4e0a2\u6bb5\u3092\u8d64\u3001\u4e2d2\u6bb5\u3092\u9ec4\u8272\u3001\u4e0b\u306e2\u6bb5\u3092\u7dd1\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; highlight: [9,10,11,12,13,14,15,16,17,19]; title: ; notranslate\" title=\"\">\r\n    Public Sub MakeBricks()\r\n        Dim i, j As Integer\r\n        Dim bw, bh As Integer\r\n        bw = 40\r\n        bh = 10\r\n        brick = New Label(9, 5) {}\r\n        For i = 0 To 9\r\n            For j = 0 To 5\r\n                Dim c As Color\r\n                Select Case j\r\n                    Case 0, 1\r\n                        c = Color.Red\r\n                    Case 2, 3\r\n                        c = Color.Yellow\r\n                    Case 4, 5\r\n                        c = Color.Green\r\n                End Select\r\n                brick(i, j) = New Label()\r\n                brick(i, j).BackColor = c\r\n                brick(i, j).Left = i * bw\r\n                brick(i, j).Top = j * bh + 50\r\n                brick(i, j).Width = bw\r\n                brick(i, j).Height = bh\r\n                brick(i, j).BorderStyle = BorderStyle.Fixed3D\r\n                Me.Controls.Add(brick(i, j))\r\n            Next\r\n        Next\r\n    End Sub\r\n<\/pre>\n<p>\u8d64\u3044\u30d6\u30ed\u30c3\u30af\u306b\u5f53\u305f\u308b\u3068\u30d6\u30ed\u30c3\u30af\u304c\u9ec4\u8272\u306b\u5909\u5316\u3057\u3001\u9ec4\u8272\u3044\u30d6\u30ed\u30c3\u30af\u306b\u5f53\u305f\u308b\u3068\u30d6\u30ed\u30c3\u30af\u304c\u7dd1\u306b\u5909\u5316\u3057\u3001\u7dd1\u306e\u30d6\u30ed\u30c3\u30af\u306b\u3042\u305f\u308b\u3068\u30d6\u30ed\u30c3\u30af\u304c\u6d88\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u8d64\u3044\u30d6\u30ed\u30c3\u30af\u306f3\u56de\u3001\u9ec4\u8272\u3044\u30d6\u30ed\u30c3\u30af\u306f2\u56de\u30dc\u30fc\u30eb\u3092\u5f53\u3066\u306a\u3044\u3068\u6d88\u3048\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3044\u307e\u306f\u7121\u6761\u4ef6\u306b\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u90e8\u5206\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; highlight: [19]; title: ; notranslate\" title=\"\">\r\n    Public Sub HitBricks()\r\n        Dim i, j As Integer\r\n        Dim r, br As Rectangle\r\n        Dim b As Label\r\n\r\n        br = New Rectangle(x, y, Ball.Width, Ball.Height)\r\n        For i = 0 To 9\r\n            For j = 0 To 5\r\n                b = brick(i, j)\r\n                r = New Rectangle(b.Left, b.Top, b.Width, b.Height)\r\n                If b.Visible = True And r.IntersectsWith(br) Then\r\n                    Dim overlap As Rectangle\r\n                    overlap = Rectangle.Intersect(r, br)\r\n                    If overlap.Width &gt; overlap.Height Then\r\n                        dy = -dy\r\n                    Else\r\n                        dx = -dx\r\n                    End If\r\n                    b.Visible = False\r\n                    score += 1\r\n                    Exit Sub\r\n                End If\r\n            Next\r\n        Next\r\n    End Sub\r\n<\/pre>\n<p>\u30d6\u30ed\u30c3\u30af\u306e\u8272\u304c\u7dd1\u306a\u3089\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u3057\u3001\u9ec4\u8272\u306a\u3089\u7dd1\u306b\u8272\u3092\u5909\u3048\u3001\u8d64\u306a\u3089\u9ec4\u8272\u306b\u8272\u3092\u5909\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n                    If b.BackColor = Color.Green Then\r\n                        b.Visible = False\r\n                    ElseIf b.BackColor = Color.Yellow Then\r\n                        b.BackColor = Color.Green\r\n                    ElseIf b.BackColor = Color.Red Then\r\n                        b.BackColor = Color.Yellow\r\n                    End If\r\n<\/pre>\n<!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u73fe\u5728\u306f\u30dc\u30fc\u30eb\u304c\u30d6\u30ed\u30c3\u30af\u306b\u4e00\u5ea6\u3060\u3051\u5f53\u305f\u308c\u3070\u30d6\u30ed\u30c3\u30af\u306f\u6d88\u3048\u307e\u3059\u304c\u3001\u8907\u6570\u56de\u5f53\u305f\u3089\u306a\u3044\u3068\u6d88\u3048\u306a\u3044\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002 \u30d6\u30ed\u30c3\u30af\u306e\u4e0a2\u6bb5\u3092\u8d64\u3001\u4e2d2\u6bb5\u3092\u9ec4\u8272\u3001\u4e0b\u306e2\u6bb5\u3092\u7dd1\u306b\u3057\u307e\u3059\u3002 Public Sub MakeBricks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-visualbasic"],"_links":{"self":[{"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":3,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kpcvb.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}