GitHub PullRequestReviewCommentEvent at 2014-09-23 05:03:04
Repository: game_center_project
Actor: pndpo
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/comments/17892092","id":17892092,"diff_hunk":"@@ -1 +1,328 @@\n-# Your code here!\n\\ No newline at end of file\n+# File:           connect_four.rb\n+# Purpose:        Week 2 paired project for the Viking Code School - http://www.vikingcodeschool.com/week-2-ruby/building-the-game-back-ends\n+# Author(s):      Matthew Davis ( Github: chewieee)  \n+# \t\t\t\t\t\t\t\tPaul H. Hyman (phyman.com | GitHub: phyman) \n+# Copyright:      (C) Matthew Davis && Paul H. Hyman 2014 -\n+# Product:        CLI version of the Connect Four game written in Ruby\n+\n+#!/usr/bin/ruby\n+\n+\tclass ConnectFourGame\n+\n+\t\tdef initialize\n+\t\t\t@Win_count = 4 # 4 in a row wins\n+\t\t\t@Col_num = 7\n+\t\t\t@Row_num = 6\n+\t\t\t@winner_player = nil\n+\t\t\t@board = Board.new(@Col_num, @Row_num)\n+\t\tend\n+\n+\t\tdef play\n+\t\t\tset_players(get_player_count)\n+\n+\t\t\tloop do\n+\t\t\t\t@board.render\n+\t\t\t\tprompt_player_for_turn\n+\t\t\t\tbreak if check_victory\n+\t\t\t\tswitch_player\n+\t\t\tend\n+\t\tend\n+\n+\t\tdef get_player_count\n+\t\t\tputs \"How many players? (1-2)\"\n+\t\t\tnum_players = gets.chomp.to_i\n+\t\t\t# validate player count\n+\t\t\tif num_players < 1 || num_players > 2\n+\t\t\t\tputs \"Please choose 1 or 2 players\\n\\n\"\n+\t\t\t\tget_player_count()\n+\t\t\tend  \n+\t\t\treturn num_players\n+\t\tend\n+\n+\t\tdef set_players(player_count)\n+\t\t\t@player_1 = Player.new(@board, 1, \"赤\")\n+\n+\t\t\tif player_count == 1\n+\t\t\t\t@player_2 = AI.new(@board, 2, \"黄\")\n+\t\t\telse\n+\t\t\t\t@player_2 = Player.new(@board, 2, \"黄\")\n+\t\t\tend\n+\n+\t\t\t@current_player = [@player_1, @player_2].sample\n+\t\tend","path":"connect_four/connect_four.rb","position":54,"original_position":54,"commit_id":"bf2ddc37abcd64bb9f936533b36fa8c5845ec405","original_commit_id":"bf2ddc37abcd64bb9f936533b36fa8c5845ec405","user":{"login":"pndpo","id":6679554,"avatar_url":"https://avatars.githubusercontent.com/u/6679554?v=2","gravatar_id":"","url":"https://api.github.com/users/pndpo","html_url":"https://github.com/pndpo","followers_url":"https://api.github.com/users/pndpo/followers","following_url":"https://api.github.com/users/pndpo/following{/other_user}","gists_url":"https://api.github.com/users/pndpo/gists{/gist_id}","starred_url":"https://api.github.com/users/pndpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pndpo/subscriptions","organizations_url":"https://api.github.com/users/pndpo/orgs","repos_url":"https://api.github.com/users/pndpo/repos","events_url":"https://api.github.com/users/pndpo/events{/privacy}","received_events_url":"https://api.github.com/users/pndpo/received_events","type":"User","site_admin":false},"body":"Very nice!","created_at":"2014-09-23T05:03:04Z","updated_at":"2014-09-23T05:03:04Z","html_url":"https://github.com/vikingeducation/game_center_project/pull/6#discussion_r17892092","pull_request_url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/comments/17892092"},"html":{"href":"https://github.com/vikingeducation/game_center_project/pull/6#discussion_r17892092"},"pull_request":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6","id":21559150,"html_url":"https://github.com/vikingeducation/game_center_project/pull/6","diff_url":"https://github.com/vikingeducation/game_center_project/pull/6.diff","patch_url":"https://github.com/vikingeducation/game_center_project/pull/6.patch","issue_url":"https://api.github.com/repos/vikingeducation/game_center_project/issues/6","number":6,"state":"open","locked":false,"title":"MD and PH warmup/RPS/C4","user":{"login":"chewieee","id":7763886,"avatar_url":"https://avatars.githubusercontent.com/u/7763886?v=2","gravatar_id":"","url":"https://api.github.com/users/chewieee","html_url":"https://github.com/chewieee","followers_url":"https://api.github.com/users/chewieee/followers","following_url":"https://api.github.com/users/chewieee/following{/other_user}","gists_url":"https://api.github.com/users/chewieee/gists{/gist_id}","starred_url":"https://api.github.com/users/chewieee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chewieee/subscriptions","organizations_url":"https://api.github.com/users/chewieee/orgs","repos_url":"https://api.github.com/users/chewieee/repos","events_url":"https://api.github.com/users/chewieee/events{/privacy}","received_events_url":"https://api.github.com/users/chewieee/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-22T05:02:33Z","updated_at":"2014-09-23T05:03:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5e7f58144ebcb7d1f84005d79af60ee5a375913","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6/commits","review_comments_url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6/comments","review_comment_url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/comments/{number}","comments_url":"https://api.github.com/repos/vikingeducation/game_center_project/issues/6/comments","statuses_url":"https://api.github.com/repos/vikingeducation/game_center_project/statuses/bf2ddc37abcd64bb9f936533b36fa8c5845ec405","head":{"label":"chewieee:master","ref":"master","sha":"bf2ddc37abcd64bb9f936533b36fa8c5845ec405","user":{"login":"chewieee","id":7763886,"avatar_url":"https://avatars.githubusercontent.com/u/7763886?v=2","gravatar_id":"","url":"https://api.github.com/users/chewieee","html_url":"https://github.com/chewieee","followers_url":"https://api.github.com/users/chewieee/followers","following_url":"https://api.github.com/users/chewieee/following{/other_user}","gists_url":"https://api.github.com/users/chewieee/gists{/gist_id}","starred_url":"https://api.github.com/users/chewieee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chewieee/subscriptions","organizations_url":"https://api.github.com/users/chewieee/orgs","repos_url":"https://api.github.com/users/chewieee/repos","events_url":"https://api.github.com/users/chewieee/events{/privacy}","received_events_url":"https://api.github.com/users/chewieee/received_events","type":"User","site_admin":false},"repo":{"id":24243871,"name":"game_center_project","full_name":"chewieee/game_center_project","owner":{"login":"chewieee","id":7763886,"avatar_url":"https://avatars.githubusercontent.com/u/7763886?v=2","gravatar_id":"","url":"https://api.github.com/users/chewieee","html_url":"https://github.com/chewieee","followers_url":"https://api.github.com/users/chewieee/followers","following_url":"https://api.github.com/users/chewieee/following{/other_user}","gists_url":"https://api.github.com/users/chewieee/gists{/gist_id}","starred_url":"https://api.github.com/users/chewieee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chewieee/subscriptions","organizations_url":"https://api.github.com/users/chewieee/orgs","repos_url":"https://api.github.com/users/chewieee/repos","events_url":"https://api.github.com/users/chewieee/events{/privacy}","received_events_url":"https://api.github.com/users/chewieee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chewieee/game_center_project","description":"The Game Center Project for the Koding for Kids organization","fork":true,"url":"https://api.github.com/repos/chewieee/game_center_project","forks_url":"https://api.github.com/repos/chewieee/game_center_project/forks","keys_url":"https://api.github.com/repos/chewieee/game_center_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chewieee/game_center_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chewieee/game_center_project/teams","hooks_url":"https://api.github.com/repos/chewieee/game_center_project/hooks","issue_events_url":"https://api.github.com/repos/chewieee/game_center_project/issues/events{/number}","events_url":"https://api.github.com/repos/chewieee/game_center_project/events","assignees_url":"https://api.github.com/repos/chewieee/game_center_project/assignees{/user}","branches_url":"https://api.github.com/repos/chewieee/game_center_project/branches{/branch}","tags_url":"https://api.github.com/repos/chewieee/game_center_project/tags","blobs_url":"https://api.github.com/repos/chewieee/game_center_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chewieee/game_center_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chewieee/game_center_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/chewieee/game_center_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chewieee/game_center_project/statuses/{sha}","languages_url":"https://api.github.com/repos/chewieee/game_center_project/languages","stargazers_url":"https://api.github.com/repos/chewieee/game_center_project/stargazers","contributors_url":"https://api.github.com/repos/chewieee/game_center_project/contributors","subscribers_url":"https://api.github.com/repos/chewieee/game_center_project/subscribers","subscription_url":"https://api.github.com/repos/chewieee/game_center_project/subscription","commits_url":"https://api.github.com/repos/chewieee/game_center_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/chewieee/game_center_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/chewieee/game_center_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/chewieee/game_center_project/issues/comments/{number}","contents_url":"https://api.github.com/repos/chewieee/game_center_project/contents/{+path}","compare_url":"https://api.github.com/repos/chewieee/game_center_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chewieee/game_center_project/merges","archive_url":"https://api.github.com/repos/chewieee/game_center_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chewieee/game_center_project/downloads","issues_url":"https://api.github.com/repos/chewieee/game_center_project/issues{/number}","pulls_url":"https://api.github.com/repos/chewieee/game_center_project/pulls{/number}","milestones_url":"https://api.github.com/repos/chewieee/game_center_project/milestones{/number}","notifications_url":"https://api.github.com/repos/chewieee/game_center_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chewieee/game_center_project/labels{/name}","releases_url":"https://api.github.com/repos/chewieee/game_center_project/releases{/id}","created_at":"2014-09-19T20:10:01Z","updated_at":"2014-09-19T22:02:18Z","pushed_at":"2014-09-22T04:57:51Z","git_url":"git://github.com/chewieee/game_center_project.git","ssh_url":"git@github.com:chewieee/game_center_project.git","clone_url":"https://github.com/chewieee/game_center_project.git","svn_url":"https://github.com/chewieee/game_center_project","homepage":null,"size":137,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vikingeducation:master","ref":"master","sha":"5e0e9a8250ed863ba9edea1e95853b47b2a7610d","user":{"login":"vikingeducation","id":7231832,"avatar_url":"https://avatars.githubusercontent.com/u/7231832?v=2","gravatar_id":"","url":"https://api.github.com/users/vikingeducation","html_url":"https://github.com/vikingeducation","followers_url":"https://api.github.com/users/vikingeducation/followers","following_url":"https://api.github.com/users/vikingeducation/following{/other_user}","gists_url":"https://api.github.com/users/vikingeducation/gists{/gist_id}","starred_url":"https://api.github.com/users/vikingeducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikingeducation/subscriptions","organizations_url":"https://api.github.com/users/vikingeducation/orgs","repos_url":"https://api.github.com/users/vikingeducation/repos","events_url":"https://api.github.com/users/vikingeducation/events{/privacy}","received_events_url":"https://api.github.com/users/vikingeducation/received_events","type":"Organization","site_admin":false},"repo":{"id":23600230,"name":"game_center_project","full_name":"vikingeducation/game_center_project","owner":{"login":"vikingeducation","id":7231832,"avatar_url":"https://avatars.githubusercontent.com/u/7231832?v=2","gravatar_id":"","url":"https://api.github.com/users/vikingeducation","html_url":"https://github.com/vikingeducation","followers_url":"https://api.github.com/users/vikingeducation/followers","following_url":"https://api.github.com/users/vikingeducation/following{/other_user}","gists_url":"https://api.github.com/users/vikingeducation/gists{/gist_id}","starred_url":"https://api.github.com/users/vikingeducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikingeducation/subscriptions","organizations_url":"https://api.github.com/users/vikingeducation/orgs","repos_url":"https://api.github.com/users/vikingeducation/repos","events_url":"https://api.github.com/users/vikingeducation/events{/privacy}","received_events_url":"https://api.github.com/users/vikingeducation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vikingeducation/game_center_project","description":"The Game Center Project for the Koding for Kids organization","fork":false,"url":"https://api.github.com/repos/vikingeducation/game_center_project","forks_url":"https://api.github.com/repos/vikingeducation/game_center_project/forks","keys_url":"https://api.github.com/repos/vikingeducation/game_center_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vikingeducation/game_center_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vikingeducation/game_center_project/teams","hooks_url":"https://api.github.com/repos/vikingeducation/game_center_project/hooks","issue_events_url":"https://api.github.com/repos/vikingeducation/game_center_project/issues/events{/number}","events_url":"https://api.github.com/repos/vikingeducation/game_center_project/events","assignees_url":"https://api.github.com/repos/vikingeducation/game_center_project/assignees{/user}","branches_url":"https://api.github.com/repos/vikingeducation/game_center_project/branches{/branch}","tags_url":"https://api.github.com/repos/vikingeducation/game_center_project/tags","blobs_url":"https://api.github.com/repos/vikingeducation/game_center_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vikingeducation/game_center_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vikingeducation/game_center_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/vikingeducation/game_center_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vikingeducation/game_center_project/statuses/{sha}","languages_url":"https://api.github.com/repos/vikingeducation/game_center_project/languages","stargazers_url":"https://api.github.com/repos/vikingeducation/game_center_project/stargazers","contributors_url":"https://api.github.com/repos/vikingeducation/game_center_project/contributors","subscribers_url":"https://api.github.com/repos/vikingeducation/game_center_project/subscribers","subscription_url":"https://api.github.com/repos/vikingeducation/game_center_project/subscription","commits_url":"https://api.github.com/repos/vikingeducation/game_center_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/vikingeducation/game_center_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/vikingeducation/game_center_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/vikingeducation/game_center_project/issues/comments/{number}","contents_url":"https://api.github.com/repos/vikingeducation/game_center_project/contents/{+path}","compare_url":"https://api.github.com/repos/vikingeducation/game_center_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vikingeducation/game_center_project/merges","archive_url":"https://api.github.com/repos/vikingeducation/game_center_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vikingeducation/game_center_project/downloads","issues_url":"https://api.github.com/repos/vikingeducation/game_center_project/issues{/number}","pulls_url":"https://api.github.com/repos/vikingeducation/game_center_project/pulls{/number}","milestones_url":"https://api.github.com/repos/vikingeducation/game_center_project/milestones{/number}","notifications_url":"https://api.github.com/repos/vikingeducation/game_center_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vikingeducation/game_center_project/labels{/name}","releases_url":"https://api.github.com/repos/vikingeducation/game_center_project/releases{/id}","created_at":"2014-09-03T00:13:34Z","updated_at":"2014-09-14T21:56:01Z","pushed_at":"2014-09-03T01:45:16Z","git_url":"git://github.com/vikingeducation/game_center_project.git","ssh_url":"git@github.com:vikingeducation/game_center_project.git","clone_url":"https://github.com/vikingeducation/game_center_project.git","svn_url":"https://github.com/vikingeducation/game_center_project","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6"},"html":{"href":"https://github.com/vikingeducation/game_center_project/pull/6"},"issue":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/issues/6"},"comments":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/vikingeducation/game_center_project/statuses/bf2ddc37abcd64bb9f936533b36fa8c5845ec405"}}}}