{"action":"created","comment":{"url":"https://api.github.com/repos/yuukpro/tetris/pulls/comments/66249974","id":66249974,"diff_hunk":"@@ -0,0 +1,93 @@\n+package jp.tetris;\n+\n+import java.net.URL;\n+import java.util.List;\n+import java.util.ResourceBundle;\n+import javafx.fxml.FXML;\n+import javafx.fxml.Initializable;\n+import javafx.scene.layout.GridPane;\n+import javafx.scene.paint.Color;\n+import javafx.scene.paint.Paint;\n+import javafx.scene.shape.Rectangle;\n+\n+/**\n+ * フィールド\n+ * フィールド内のテトリミノを管理\n+ * \n+ * */\n+\n+public class TetrisPlayFieldController implements Initializable {\n+\t//フィールド\n+\t@FXML\n+\tprivate GridPane fieldPanel;\n+\tprivate Rectangle[][] fieldMatrix;\n+\tprivate Rectangle[][] tetoriminoMatrix;\n+\t//フィールドサイズ\n+\tfinal int height =40;\n+\tfinal int width = 20;\n+\t//ブロックサイズ\n+\tfinal int BLOCK_SIZE = 15;\n+\t\n+\t@Override\n+\tpublic void initialize(URL location, ResourceBundle resources) {\n+\t\t// TODO Auto-generated method stub\n+\t\tfieldPanel.setFocusTraversable(true);\n+\t\tfieldPanel.requestFocus();\n+\t\t\n+\t}\n+\t/**\n+\t * テトリスをするフィールドを作成\n+\t * */\n+\tpublic void initFieldView(){\n+\t\t//テトリスフィールドの大きさ初期化\n+\t\tfieldMatrix = new Rectangle[this.height][this.width];\t\t\n+\t\tfor (int i = 0; i < this.height; i++) {\n+\t\t\tfor (int j = 0; j < this.width; j++) {\n+\t\t\t\tRectangle fieldBlock = new Rectangle(BLOCK_SIZE, BLOCK_SIZE);\n+\t\t\t\tfieldBlock.setFill(Color.AQUA);\n+\t\t\t\tfieldMatrix[i][j] = fieldBlock;\n+\t\t\t\tfieldPanel.add(fieldBlock, j, i );\n+\t\t\t}\n+\t\t}\n+\t}\n+\t\n+\t\n+\t/*\n+\t * I型テトリミノを表示\n+\t * **/\n+\tpublic void initDrawingTetorimino(){\n+\t\tTetorimino teto= new Tetorimino();\n+\t\t//TODO 描画サンプル\n+\t\tList<int[][]> t = teto.getTetorimino().getShape();\n+\t\ttetoriminoMatrix = new Rectangle[t.get(0).length][t.get(0)[0].length];\t\n+\t\tfor(int i= 0; i<t.get(0).length;i++){\n+\t\t\tfor(int j =0;j<t.get(0)[0].length; j++){\n+\t\t\t\tRectangle tetoriminoBlock = new Rectangle(BLOCK_SIZE,BLOCK_SIZE);\n+\t\t\t\ttetoriminoBlock.setFill(getFillColor(t.get(0)[i][j]));\n+\t\t\t\ttetoriminoMatrix[i][j] =tetoriminoBlock;","path":"src/main/java/jp/tetris/TetrisPlayFieldController.java","position":null,"original_position":67,"commit_id":"b6e57f599e7ae590723ea0d107375e7948794a18","original_commit_id":"bb3fd567e976fac218bb6ae3928c1f5171fd10fb","user":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"body":"使われていないので削除いたします。","created_at":"2016-06-08T13:00:10Z","updated_at":"2016-06-08T13:00:10Z","html_url":"https://github.com/yuukpro/tetris/pull/8#discussion_r66249974","pull_request_url":"https://api.github.com/repos/yuukpro/tetris/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/comments/66249974"},"html":{"href":"https://github.com/yuukpro/tetris/pull/8#discussion_r66249974"},"pull_request":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/yuukpro/tetris/pulls/8","id":72160259,"html_url":"https://github.com/yuukpro/tetris/pull/8","diff_url":"https://github.com/yuukpro/tetris/pull/8.diff","patch_url":"https://github.com/yuukpro/tetris/pull/8.patch","issue_url":"https://api.github.com/repos/yuukpro/tetris/issues/8","number":8,"state":"open","locked":false,"title":"I型テトリミノ描画","user":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"body":"ゲームフィールド作成\r\nフィールド生成\r\nI型テトリミノをフィールド上に描画","created_at":"2016-06-01T10:54:59Z","updated_at":"2016-06-08T13:00:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9b18d2a15d164677da967b561967e66abae5e33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yuukpro/tetris/pulls/8/commits","review_comments_url":"https://api.github.com/repos/yuukpro/tetris/pulls/8/comments","review_comment_url":"https://api.github.com/repos/yuukpro/tetris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuukpro/tetris/issues/8/comments","statuses_url":"https://api.github.com/repos/yuukpro/tetris/statuses/b6e57f599e7ae590723ea0d107375e7948794a18","head":{"label":"yuukpro:feature/drawingItetorimino","ref":"feature/drawingItetorimino","sha":"b6e57f599e7ae590723ea0d107375e7948794a18","user":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"repo":{"id":59269317,"name":"tetris","full_name":"yuukpro/tetris","owner":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuukpro/tetris","description":"","fork":false,"url":"https://api.github.com/repos/yuukpro/tetris","forks_url":"https://api.github.com/repos/yuukpro/tetris/forks","keys_url":"https://api.github.com/repos/yuukpro/tetris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuukpro/tetris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuukpro/tetris/teams","hooks_url":"https://api.github.com/repos/yuukpro/tetris/hooks","issue_events_url":"https://api.github.com/repos/yuukpro/tetris/issues/events{/number}","events_url":"https://api.github.com/repos/yuukpro/tetris/events","assignees_url":"https://api.github.com/repos/yuukpro/tetris/assignees{/user}","branches_url":"https://api.github.com/repos/yuukpro/tetris/branches{/branch}","tags_url":"https://api.github.com/repos/yuukpro/tetris/tags","blobs_url":"https://api.github.com/repos/yuukpro/tetris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuukpro/tetris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuukpro/tetris/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuukpro/tetris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuukpro/tetris/statuses/{sha}","languages_url":"https://api.github.com/repos/yuukpro/tetris/languages","stargazers_url":"https://api.github.com/repos/yuukpro/tetris/stargazers","contributors_url":"https://api.github.com/repos/yuukpro/tetris/contributors","subscribers_url":"https://api.github.com/repos/yuukpro/tetris/subscribers","subscription_url":"https://api.github.com/repos/yuukpro/tetris/subscription","commits_url":"https://api.github.com/repos/yuukpro/tetris/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuukpro/tetris/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuukpro/tetris/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuukpro/tetris/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuukpro/tetris/contents/{+path}","compare_url":"https://api.github.com/repos/yuukpro/tetris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuukpro/tetris/merges","archive_url":"https://api.github.com/repos/yuukpro/tetris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuukpro/tetris/downloads","issues_url":"https://api.github.com/repos/yuukpro/tetris/issues{/number}","pulls_url":"https://api.github.com/repos/yuukpro/tetris/pulls{/number}","milestones_url":"https://api.github.com/repos/yuukpro/tetris/milestones{/number}","notifications_url":"https://api.github.com/repos/yuukpro/tetris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuukpro/tetris/labels{/name}","releases_url":"https://api.github.com/repos/yuukpro/tetris/releases{/id}","deployments_url":"https://api.github.com/repos/yuukpro/tetris/deployments","created_at":"2016-05-20T06:06:31Z","updated_at":"2016-05-24T07:48:31Z","pushed_at":"2016-06-08T12:48:05Z","git_url":"git://github.com/yuukpro/tetris.git","ssh_url":"git@github.com:yuukpro/tetris.git","clone_url":"https://github.com/yuukpro/tetris.git","svn_url":"https://github.com/yuukpro/tetris","homepage":null,"size":28,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"develop"}},"base":{"label":"yuukpro:develop","ref":"develop","sha":"524224baca1fa0be3419e77813304b88c4017908","user":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"repo":{"id":59269317,"name":"tetris","full_name":"yuukpro/tetris","owner":{"login":"yuukpro","id":19484994,"avatar_url":"https://avatars.githubusercontent.com/u/19484994?v=3","gravatar_id":"","url":"https://api.github.com/users/yuukpro","html_url":"https://github.com/yuukpro","followers_url":"https://api.github.com/users/yuukpro/followers","following_url":"https://api.github.com/users/yuukpro/following{/other_user}","gists_url":"https://api.github.com/users/yuukpro/gists{/gist_id}","starred_url":"https://api.github.com/users/yuukpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuukpro/subscriptions","organizations_url":"https://api.github.com/users/yuukpro/orgs","repos_url":"https://api.github.com/users/yuukpro/repos","events_url":"https://api.github.com/users/yuukpro/events{/privacy}","received_events_url":"https://api.github.com/users/yuukpro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuukpro/tetris","description":"","fork":false,"url":"https://api.github.com/repos/yuukpro/tetris","forks_url":"https://api.github.com/repos/yuukpro/tetris/forks","keys_url":"https://api.github.com/repos/yuukpro/tetris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuukpro/tetris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuukpro/tetris/teams","hooks_url":"https://api.github.com/repos/yuukpro/tetris/hooks","issue_events_url":"https://api.github.com/repos/yuukpro/tetris/issues/events{/number}","events_url":"https://api.github.com/repos/yuukpro/tetris/events","assignees_url":"https://api.github.com/repos/yuukpro/tetris/assignees{/user}","branches_url":"https://api.github.com/repos/yuukpro/tetris/branches{/branch}","tags_url":"https://api.github.com/repos/yuukpro/tetris/tags","blobs_url":"https://api.github.com/repos/yuukpro/tetris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuukpro/tetris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuukpro/tetris/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuukpro/tetris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuukpro/tetris/statuses/{sha}","languages_url":"https://api.github.com/repos/yuukpro/tetris/languages","stargazers_url":"https://api.github.com/repos/yuukpro/tetris/stargazers","contributors_url":"https://api.github.com/repos/yuukpro/tetris/contributors","subscribers_url":"https://api.github.com/repos/yuukpro/tetris/subscribers","subscription_url":"https://api.github.com/repos/yuukpro/tetris/subscription","commits_url":"https://api.github.com/repos/yuukpro/tetris/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuukpro/tetris/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuukpro/tetris/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuukpro/tetris/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuukpro/tetris/contents/{+path}","compare_url":"https://api.github.com/repos/yuukpro/tetris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuukpro/tetris/merges","archive_url":"https://api.github.com/repos/yuukpro/tetris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuukpro/tetris/downloads","issues_url":"https://api.github.com/repos/yuukpro/tetris/issues{/number}","pulls_url":"https://api.github.com/repos/yuukpro/tetris/pulls{/number}","milestones_url":"https://api.github.com/repos/yuukpro/tetris/milestones{/number}","notifications_url":"https://api.github.com/repos/yuukpro/tetris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuukpro/tetris/labels{/name}","releases_url":"https://api.github.com/repos/yuukpro/tetris/releases{/id}","deployments_url":"https://api.github.com/repos/yuukpro/tetris/deployments","created_at":"2016-05-20T06:06:31Z","updated_at":"2016-05-24T07:48:31Z","pushed_at":"2016-06-08T12:48:05Z","git_url":"git://github.com/yuukpro/tetris.git","ssh_url":"git@github.com:yuukpro/tetris.git","clone_url":"https://github.com/yuukpro/tetris.git","svn_url":"https://github.com/yuukpro/tetris","homepage":null,"size":28,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/8"},"html":{"href":"https://github.com/yuukpro/tetris/pull/8"},"issue":{"href":"https://api.github.com/repos/yuukpro/tetris/issues/8"},"comments":{"href":"https://api.github.com/repos/yuukpro/tetris/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuukpro/tetris/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/yuukpro/tetris/statuses/b6e57f599e7ae590723ea0d107375e7948794a18"}}}}
{"actor":{"display_login":"yuukpro"}}