{"action":"created","comment":{"url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/comments/242425376","pull_request_review_id":185928151,"id":242425376,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjQyNTM3Ng==","diff_hunk":"@@ -0,0 +1,65 @@\n+// ----------------------------------------\n+// 課題3 じゃんけん\n+// ----------------------------------------\n+'use strict'\n+\n+// -------------------\n+// じゃんけんの手\n+// -------------------\n+export class Shape {\n+  /** じゃんけんの手(グー, チョキ, パー)を生成し、配列として返却する。 */\n+  static shapes() {\n+    // ※各値は、staticに保持\n+    Shape.GU = new Shape('グー')\n+    Shape.CH = new Shape('チョキ')\n+    Shape.PA = new Shape('パー')\n+    const [gu, ch, pa] = [Shape.GU, Shape.CH, Shape.PA] // ※変数名を短縮\n+\n+    // Keyに対して、「負け」となる手をMapに登録しておく\n+    const wm = new Map()\n+    wm.set(gu, ch)\n+    wm.set(ch, pa)\n+    wm.set(pa, gu)\n+    Shape.WeakerMap = wm // ※staticに保持\n+\n+    return [gu, ch, pa]\n+  }\n+\n+  // 【要注意】このclass定義外からの呼び出し禁止\n+  constructor(name) {\n+    this.name = name\n+  }\n+\n+  /** この手が、指定された手(`shape`)よりも強ければ`true`を返す。 */\n+  isStrongerThan(shape) {\n+    return shape === Shape.WeakerMap.get(this)\n+  }\n+\n+  toString() {\n+    return this.name\n+  }\n+}\n+\n+/** 指定された手の配列(`shapes`)から、「勝ち」となる手を返す。\n+ * 勝ちが決まらない(「あいこ」となる)場合、結果は`null`。\n+ * @param {*} shapes 対戦に参加する全ての手の配列\n+ * @returns 「勝ち」となる手(「あいこ」の場合 `null`)\n+ */\n+export function battle(...shapes) {\n+  // 重複をなくすため、一旦Setに変換\n+  const uniqShapes = Array.from(new Set(shapes))","path":"03_じゃんけん/janken.js","position":50,"original_position":50,"commit_id":"a72855399931aa7ab7c883b6b1b365095a838622","original_commit_id":"a72855399931aa7ab7c883b6b1b365095a838622","user":{"login":"the-red","id":4494300,"node_id":"MDQ6VXNlcjQ0OTQzMDA=","avatar_url":"https://avatars3.githubusercontent.com/u/4494300?v=4","gravatar_id":"","url":"https://api.github.com/users/the-red","html_url":"https://github.com/the-red","followers_url":"https://api.github.com/users/the-red/followers","following_url":"https://api.github.com/users/the-red/following{/other_user}","gists_url":"https://api.github.com/users/the-red/gists{/gist_id}","starred_url":"https://api.github.com/users/the-red/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-red/subscriptions","organizations_url":"https://api.github.com/users/the-red/orgs","repos_url":"https://api.github.com/users/the-red/repos","events_url":"https://api.github.com/users/the-red/events{/privacy}","received_events_url":"https://api.github.com/users/the-red/received_events","type":"User","site_admin":false},"body":"面白い！","created_at":"2018-12-18T07:06:44Z","updated_at":"2018-12-18T07:13:10Z","html_url":"https://github.com/pale2f/try_gyomuhackers/pull/1#discussion_r242425376","pull_request_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/comments/242425376"},"html":{"href":"https://github.com/pale2f/try_gyomuhackers/pull/1#discussion_r242425376"},"pull_request":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1","id":228622305,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NjIyMzA1","html_url":"https://github.com/pale2f/try_gyomuhackers/pull/1","diff_url":"https://github.com/pale2f/try_gyomuhackers/pull/1.diff","patch_url":"https://github.com/pale2f/try_gyomuhackers/pull/1.patch","issue_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/1","number":1,"state":"open","locked":false,"title":"JavaScript 問題","user":{"login":"pale2f","id":12695377,"node_id":"MDQ6VXNlcjEyNjk1Mzc3","avatar_url":"https://avatars3.githubusercontent.com/u/12695377?v=4","gravatar_id":"","url":"https://api.github.com/users/pale2f","html_url":"https://github.com/pale2f","followers_url":"https://api.github.com/users/pale2f/followers","following_url":"https://api.github.com/users/pale2f/following{/other_user}","gists_url":"https://api.github.com/users/pale2f/gists{/gist_id}","starred_url":"https://api.github.com/users/pale2f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale2f/subscriptions","organizations_url":"https://api.github.com/users/pale2f/orgs","repos_url":"https://api.github.com/users/pale2f/repos","events_url":"https://api.github.com/users/pale2f/events{/privacy}","received_events_url":"https://api.github.com/users/pale2f/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-06T09:23:56Z","updated_at":"2018-12-18T07:13:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81d405794f73a99c25823e3b6fa82543d1b588c5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1/commits","review_comments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1/comments","review_comment_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/1/comments","statuses_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/statuses/a72855399931aa7ab7c883b6b1b365095a838622","head":{"label":"pale2f:develop","ref":"develop","sha":"a72855399931aa7ab7c883b6b1b365095a838622","user":{"login":"pale2f","id":12695377,"node_id":"MDQ6VXNlcjEyNjk1Mzc3","avatar_url":"https://avatars3.githubusercontent.com/u/12695377?v=4","gravatar_id":"","url":"https://api.github.com/users/pale2f","html_url":"https://github.com/pale2f","followers_url":"https://api.github.com/users/pale2f/followers","following_url":"https://api.github.com/users/pale2f/following{/other_user}","gists_url":"https://api.github.com/users/pale2f/gists{/gist_id}","starred_url":"https://api.github.com/users/pale2f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale2f/subscriptions","organizations_url":"https://api.github.com/users/pale2f/orgs","repos_url":"https://api.github.com/users/pale2f/repos","events_url":"https://api.github.com/users/pale2f/events{/privacy}","received_events_url":"https://api.github.com/users/pale2f/received_events","type":"User","site_admin":false},"repo":{"id":156356170,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNTYxNzA=","name":"try_gyomuhackers","full_name":"pale2f/try_gyomuhackers","private":false,"owner":{"login":"pale2f","id":12695377,"node_id":"MDQ6VXNlcjEyNjk1Mzc3","avatar_url":"https://avatars3.githubusercontent.com/u/12695377?v=4","gravatar_id":"","url":"https://api.github.com/users/pale2f","html_url":"https://github.com/pale2f","followers_url":"https://api.github.com/users/pale2f/followers","following_url":"https://api.github.com/users/pale2f/following{/other_user}","gists_url":"https://api.github.com/users/pale2f/gists{/gist_id}","starred_url":"https://api.github.com/users/pale2f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale2f/subscriptions","organizations_url":"https://api.github.com/users/pale2f/orgs","repos_url":"https://api.github.com/users/pale2f/repos","events_url":"https://api.github.com/users/pale2f/events{/privacy}","received_events_url":"https://api.github.com/users/pale2f/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pale2f/try_gyomuhackers","description":null,"fork":false,"url":"https://api.github.com/repos/pale2f/try_gyomuhackers","forks_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/forks","keys_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/teams","hooks_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/hooks","issue_events_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/events{/number}","events_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/events","assignees_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/assignees{/user}","branches_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/branches{/branch}","tags_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/tags","blobs_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/refs{/sha}","trees_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/statuses/{sha}","languages_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/languages","stargazers_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/stargazers","contributors_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/contributors","subscribers_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/subscribers","subscription_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/subscription","commits_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/commits{/sha}","git_commits_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/commits{/sha}","comments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/comments{/number}","issue_comment_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/comments{/number}","contents_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/contents/{+path}","compare_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/merges","archive_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/downloads","issues_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues{/number}","pulls_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls{/number}","milestones_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/milestones{/number}","notifications_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/labels{/name}","releases_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/releases{/id}","deployments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/deployments","created_at":"2018-11-06T09:08:56Z","updated_at":"2018-12-05T13:21:47Z","pushed_at":"2018-12-05T13:21:46Z","git_url":"git://github.com/pale2f/try_gyomuhackers.git","ssh_url":"git@github.com:pale2f/try_gyomuhackers.git","clone_url":"https://github.com/pale2f/try_gyomuhackers.git","svn_url":"https://github.com/pale2f/try_gyomuhackers","homepage":null,"size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"pale2f:master","ref":"master","sha":"8f08d42b450d667ecc5de7352fdd765f3397cf52","user":{"login":"pale2f","id":12695377,"node_id":"MDQ6VXNlcjEyNjk1Mzc3","avatar_url":"https://avatars3.githubusercontent.com/u/12695377?v=4","gravatar_id":"","url":"https://api.github.com/users/pale2f","html_url":"https://github.com/pale2f","followers_url":"https://api.github.com/users/pale2f/followers","following_url":"https://api.github.com/users/pale2f/following{/other_user}","gists_url":"https://api.github.com/users/pale2f/gists{/gist_id}","starred_url":"https://api.github.com/users/pale2f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale2f/subscriptions","organizations_url":"https://api.github.com/users/pale2f/orgs","repos_url":"https://api.github.com/users/pale2f/repos","events_url":"https://api.github.com/users/pale2f/events{/privacy}","received_events_url":"https://api.github.com/users/pale2f/received_events","type":"User","site_admin":false},"repo":{"id":156356170,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNTYxNzA=","name":"try_gyomuhackers","full_name":"pale2f/try_gyomuhackers","private":false,"owner":{"login":"pale2f","id":12695377,"node_id":"MDQ6VXNlcjEyNjk1Mzc3","avatar_url":"https://avatars3.githubusercontent.com/u/12695377?v=4","gravatar_id":"","url":"https://api.github.com/users/pale2f","html_url":"https://github.com/pale2f","followers_url":"https://api.github.com/users/pale2f/followers","following_url":"https://api.github.com/users/pale2f/following{/other_user}","gists_url":"https://api.github.com/users/pale2f/gists{/gist_id}","starred_url":"https://api.github.com/users/pale2f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale2f/subscriptions","organizations_url":"https://api.github.com/users/pale2f/orgs","repos_url":"https://api.github.com/users/pale2f/repos","events_url":"https://api.github.com/users/pale2f/events{/privacy}","received_events_url":"https://api.github.com/users/pale2f/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pale2f/try_gyomuhackers","description":null,"fork":false,"url":"https://api.github.com/repos/pale2f/try_gyomuhackers","forks_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/forks","keys_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/teams","hooks_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/hooks","issue_events_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/events{/number}","events_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/events","assignees_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/assignees{/user}","branches_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/branches{/branch}","tags_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/tags","blobs_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/refs{/sha}","trees_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/statuses/{sha}","languages_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/languages","stargazers_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/stargazers","contributors_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/contributors","subscribers_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/subscribers","subscription_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/subscription","commits_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/commits{/sha}","git_commits_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/git/commits{/sha}","comments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/comments{/number}","issue_comment_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/comments{/number}","contents_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/contents/{+path}","compare_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/merges","archive_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/downloads","issues_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues{/number}","pulls_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls{/number}","milestones_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/milestones{/number}","notifications_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/labels{/name}","releases_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/releases{/id}","deployments_url":"https://api.github.com/repos/pale2f/try_gyomuhackers/deployments","created_at":"2018-11-06T09:08:56Z","updated_at":"2018-12-05T13:21:47Z","pushed_at":"2018-12-05T13:21:46Z","git_url":"git://github.com/pale2f/try_gyomuhackers.git","ssh_url":"git@github.com:pale2f/try_gyomuhackers.git","clone_url":"https://github.com/pale2f/try_gyomuhackers.git","svn_url":"https://github.com/pale2f/try_gyomuhackers","homepage":null,"size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1"},"html":{"href":"https://github.com/pale2f/try_gyomuhackers/pull/1"},"issue":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/1"},"comments":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/pale2f/try_gyomuhackers/statuses/a72855399931aa7ab7c883b6b1b365095a838622"}},"author_association":"OWNER"}}
{"actor":{"display_login":"the-red"}}