GitHub PullRequestReviewCommentEvent at 2014-08-07 01:08:19
Repository: university-ios-assignment-7
Actor: Maxim-38RUS-Zabelin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/comments/15913904","id":15913904,"diff_hunk":"@@ -0,0 +1,233 @@\n+\n+#import \"PongEngine.h\"\n+\n+static CGPoint const ballOrigin = {100, 100};\n+static CGSize const ballSize = {20, 20};\n+\n+static CGPoint const botOrigin = {20,40};\n+static CGSize const botSize = {120, 20};\n+\n+static NSInteger const verticalTopAsset = 60;\n+static NSInteger const verticalBottomAsset = 20;\n+static NSInteger const horizontalAsset = 0;\n+\n+typedef enum {\n+    directionNE = 0, // Up-Right\n+    directionSE = 1, // Down-Right\n+    directionSW = 2, // Down-Left\n+    directionNW = 3, // Up-Left\n+    directionDefault = directionNE\n+} Direction;\n+\n+#pragma mark - PongData Extension\n+\n+@interface PongData ()\n+\n+- (void)setBallLayout:(NSValue/*with CGRect*/*)layout;\n+- (void)setTopBotLayout:(NSValue/*with CGRect*/*)layout;\n+- (void)setBottomBotLayout:(NSValue/*with CGRect*/*)layout;\n+\n+@end\n+\n+\n+#pragma mark - PongEngine Extension\n+\n+@interface PongEngine ()\n+\n+@property (nonatomic, strong) PongData *currentData;\n+@property (nonatomic, readwrite) Direction ballMovingDirection;\n+@property (nonatomic, readwrite) BOOL topBotShouldMove;\n+@property (nonatomic, readwrite) BOOL bottomBotShouldMove;\n+\n+- (void)calculateStartData;\n+- (void)calculateFrame;\n+- (void)calculateBallMoving;\n+- (NSValue/*With CGRect*/*)calculateBotMovingWithLayout:(NSValue/*With CGRect*/*)layout;\n+\n+@end\n+\n+\n+#pragma mark - PongData Implementation\n+\n+@implementation PongData\n+\n+@synthesize ballLayout = ballLayout_;\n+@synthesize topBotLayout = topBotLayout_;\n+@synthesize bottomBotLayout = bottomBotLayout_;\n+\n+#pragma mark Private Methods\n+\n+- (void)setBallLayout:(NSValue/*with CGRect*/*)layout\n+{\n+    ballLayout_ = layout;\n+}\n+\n+- (void)setTopBotLayout:(NSValue/*with CGRect*/*)layout\n+{\n+    topBotLayout_ = layout;\n+}\n+\n+- (void)setBottomBotLayout:(NSValue/*with CGRect*/*)layout\n+{\n+    bottomBotLayout_ = layout;\n+}\n+\n+#pragma mark NSCopying Protocol Methods\n+\n+- (id)copyWithZone:(NSZone *)zone\n+{\n+    PongData *newPongData = [[[self class]allocWithZone:zone]init];\n+    newPongData.ballLayout = self.ballLayout;\n+    newPongData.topBotLayout = self.topBotLayout;\n+    newPongData.bottomBotLayout = self.bottomBotLayout;\n+    return newPongData;\n+}\n+\n+@end\n+\n+\n+#pragma mark - PongEngine Implementation\n+\n+@implementation PongEngine\n+\n+@synthesize currentData = currentData_;\n+@synthesize ballMovingDirection = ballMovingDirection_;\n+\n+\n+- (instancetype)init\n+{\n+    self = [super init];\n+    if (self) {\n+        currentData_ = [[PongData alloc]init];\n+        ballMovingDirection_ = directionDefault;\n+    }\n+    return self;\n+}\n+\n+- (void) main\n+{\n+    [self calculateStartData];\n+    dispatch_async(dispatch_get_main_queue(), ^{\n+        [self.delegate engine:self didCalculateNewData:[self.currentData copy]];\n+    });\n+    float usecSleepTime = (1/(float)self.frameRate)*1000000;\n+    while (YES) {\n+        usleep(usecSleepTime);\n+        [self calculateFrame];\n+        dispatch_async(dispatch_get_main_queue(), ^{\n+        [self.delegate engine:self didCalculateNewData:self.currentData];","path":"NoveoHomework-7/NoveoHomework-7/Classes/PongEngine.m","position":118,"original_position":118,"commit_id":"f51b8775acca227b1f5c6634dd6f93ec02253396","original_commit_id":"f51b8775acca227b1f5c6634dd6f93ec02253396","user":{"login":"Maxim-38RUS-Zabelin","id":6905856,"avatar_url":"https://avatars.githubusercontent.com/u/6905856?v=2","gravatar_id":null,"url":"https://api.github.com/users/Maxim-38RUS-Zabelin","html_url":"https://github.com/Maxim-38RUS-Zabelin","followers_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/followers","following_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/following{/other_user}","gists_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/gists{/gist_id}","starred_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/subscriptions","organizations_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/orgs","repos_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/repos","events_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/events{/privacy}","received_events_url":"https://api.github.com/users/Maxim-38RUS-Zabelin/received_events","type":"User","site_admin":false},"body":"It's a bad practice to retain 'self'; I'm dead serious.","created_at":"2014-08-07T01:08:19Z","updated_at":"2014-08-07T01:08:19Z","html_url":"https://github.com/noveogroup/university-ios-assignment-7/pull/1#discussion_r15913904","pull_request_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/comments/15913904"},"html":{"href":"https://github.com/noveogroup/university-ios-assignment-7/pull/1#discussion_r15913904"},"pull_request":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1","id":19421510,"html_url":"https://github.com/noveogroup/university-ios-assignment-7/pull/1","diff_url":"https://github.com/noveogroup/university-ios-assignment-7/pull/1.diff","patch_url":"https://github.com/noveogroup/university-ios-assignment-7/pull/1.patch","issue_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/1","number":1,"state":"open","title":"Noveo Homework 7.","user":{"login":"vadimsmirnovnsk","id":8159640,"avatar_url":"https://avatars.githubusercontent.com/u/8159640?v=2","gravatar_id":"66cc88ec01b2502e8408426e9a0dc65a","url":"https://api.github.com/users/vadimsmirnovnsk","html_url":"https://github.com/vadimsmirnovnsk","followers_url":"https://api.github.com/users/vadimsmirnovnsk/followers","following_url":"https://api.github.com/users/vadimsmirnovnsk/following{/other_user}","gists_url":"https://api.github.com/users/vadimsmirnovnsk/gists{/gist_id}","starred_url":"https://api.github.com/users/vadimsmirnovnsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadimsmirnovnsk/subscriptions","organizations_url":"https://api.github.com/users/vadimsmirnovnsk/orgs","repos_url":"https://api.github.com/users/vadimsmirnovnsk/repos","events_url":"https://api.github.com/users/vadimsmirnovnsk/events{/privacy}","received_events_url":"https://api.github.com/users/vadimsmirnovnsk/received_events","type":"User","site_admin":false},"body":"With pong.","created_at":"2014-08-06T18:18:29Z","updated_at":"2014-08-07T01:08:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c9d5950e73d5963e4bd7ec00391117be5a07a09","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1/commits","review_comments_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1/comments","review_comment_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/comments/{number}","comments_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/1/comments","statuses_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/statuses/f51b8775acca227b1f5c6634dd6f93ec02253396","head":{"label":"vadimsmirnovnsk:master","ref":"master","sha":"f51b8775acca227b1f5c6634dd6f93ec02253396","user":{"login":"vadimsmirnovnsk","id":8159640,"avatar_url":"https://avatars.githubusercontent.com/u/8159640?v=2","gravatar_id":"66cc88ec01b2502e8408426e9a0dc65a","url":"https://api.github.com/users/vadimsmirnovnsk","html_url":"https://github.com/vadimsmirnovnsk","followers_url":"https://api.github.com/users/vadimsmirnovnsk/followers","following_url":"https://api.github.com/users/vadimsmirnovnsk/following{/other_user}","gists_url":"https://api.github.com/users/vadimsmirnovnsk/gists{/gist_id}","starred_url":"https://api.github.com/users/vadimsmirnovnsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadimsmirnovnsk/subscriptions","organizations_url":"https://api.github.com/users/vadimsmirnovnsk/orgs","repos_url":"https://api.github.com/users/vadimsmirnovnsk/repos","events_url":"https://api.github.com/users/vadimsmirnovnsk/events{/privacy}","received_events_url":"https://api.github.com/users/vadimsmirnovnsk/received_events","type":"User","site_admin":false},"repo":{"id":22678201,"name":"university-ios-assignment-7","full_name":"vadimsmirnovnsk/university-ios-assignment-7","owner":{"login":"vadimsmirnovnsk","id":8159640,"avatar_url":"https://avatars.githubusercontent.com/u/8159640?v=2","gravatar_id":"66cc88ec01b2502e8408426e9a0dc65a","url":"https://api.github.com/users/vadimsmirnovnsk","html_url":"https://github.com/vadimsmirnovnsk","followers_url":"https://api.github.com/users/vadimsmirnovnsk/followers","following_url":"https://api.github.com/users/vadimsmirnovnsk/following{/other_user}","gists_url":"https://api.github.com/users/vadimsmirnovnsk/gists{/gist_id}","starred_url":"https://api.github.com/users/vadimsmirnovnsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadimsmirnovnsk/subscriptions","organizations_url":"https://api.github.com/users/vadimsmirnovnsk/orgs","repos_url":"https://api.github.com/users/vadimsmirnovnsk/repos","events_url":"https://api.github.com/users/vadimsmirnovnsk/events{/privacy}","received_events_url":"https://api.github.com/users/vadimsmirnovnsk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vadimsmirnovnsk/university-ios-assignment-7","description":"iOS assignment 7 (Multithreading) http://noveogroup.ru/noveo-university/summer-study","fork":true,"url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7","forks_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/forks","keys_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/teams","hooks_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/hooks","issue_events_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/issues/events{/number}","events_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/events","assignees_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/assignees{/user}","branches_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/branches{/branch}","tags_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/tags","blobs_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/git/refs{/sha}","trees_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/statuses/{sha}","languages_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/languages","stargazers_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/stargazers","contributors_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/contributors","subscribers_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/subscribers","subscription_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/subscription","commits_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/commits{/sha}","git_commits_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/git/commits{/sha}","comments_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/comments{/number}","issue_comment_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/issues/comments/{number}","contents_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/contents/{+path}","compare_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/merges","archive_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/downloads","issues_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/issues{/number}","pulls_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/pulls{/number}","milestones_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/milestones{/number}","notifications_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/labels{/name}","releases_url":"https://api.github.com/repos/vadimsmirnovnsk/university-ios-assignment-7/releases{/id}","created_at":"2014-08-06T10:03:36Z","updated_at":"2014-08-06T10:20:11Z","pushed_at":"2014-08-06T18:42:57Z","git_url":"git://github.com/vadimsmirnovnsk/university-ios-assignment-7.git","ssh_url":"git@github.com:vadimsmirnovnsk/university-ios-assignment-7.git","clone_url":"https://github.com/vadimsmirnovnsk/university-ios-assignment-7.git","svn_url":"https://github.com/vadimsmirnovnsk/university-ios-assignment-7","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"noveogroup:master","ref":"master","sha":"df8be772af33ec85eeb890371c8634350923f9c9","user":{"login":"noveogroup","id":3395790,"avatar_url":"https://avatars.githubusercontent.com/u/3395790?v=2","gravatar_id":"f40c16d871f85820bc5a813c5ea750e0","url":"https://api.github.com/users/noveogroup","html_url":"https://github.com/noveogroup","followers_url":"https://api.github.com/users/noveogroup/followers","following_url":"https://api.github.com/users/noveogroup/following{/other_user}","gists_url":"https://api.github.com/users/noveogroup/gists{/gist_id}","starred_url":"https://api.github.com/users/noveogroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noveogroup/subscriptions","organizations_url":"https://api.github.com/users/noveogroup/orgs","repos_url":"https://api.github.com/users/noveogroup/repos","events_url":"https://api.github.com/users/noveogroup/events{/privacy}","received_events_url":"https://api.github.com/users/noveogroup/received_events","type":"Organization","site_admin":false},"repo":{"id":22591336,"name":"university-ios-assignment-7","full_name":"noveogroup/university-ios-assignment-7","owner":{"login":"noveogroup","id":3395790,"avatar_url":"https://avatars.githubusercontent.com/u/3395790?v=2","gravatar_id":"f40c16d871f85820bc5a813c5ea750e0","url":"https://api.github.com/users/noveogroup","html_url":"https://github.com/noveogroup","followers_url":"https://api.github.com/users/noveogroup/followers","following_url":"https://api.github.com/users/noveogroup/following{/other_user}","gists_url":"https://api.github.com/users/noveogroup/gists{/gist_id}","starred_url":"https://api.github.com/users/noveogroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noveogroup/subscriptions","organizations_url":"https://api.github.com/users/noveogroup/orgs","repos_url":"https://api.github.com/users/noveogroup/repos","events_url":"https://api.github.com/users/noveogroup/events{/privacy}","received_events_url":"https://api.github.com/users/noveogroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/noveogroup/university-ios-assignment-7","description":"iOS assignment 7 (Multithreading) http://noveogroup.ru/noveo-university/summer-study","fork":false,"url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7","forks_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/forks","keys_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/teams","hooks_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/hooks","issue_events_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/events{/number}","events_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/events","assignees_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/assignees{/user}","branches_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/branches{/branch}","tags_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/tags","blobs_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/git/refs{/sha}","trees_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/statuses/{sha}","languages_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/languages","stargazers_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/stargazers","contributors_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/contributors","subscribers_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/subscribers","subscription_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/subscription","commits_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/commits{/sha}","git_commits_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/git/commits{/sha}","comments_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/comments{/number}","issue_comment_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/comments/{number}","contents_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/contents/{+path}","compare_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/merges","archive_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/downloads","issues_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues{/number}","pulls_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls{/number}","milestones_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/milestones{/number}","notifications_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/labels{/name}","releases_url":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/releases{/id}","created_at":"2014-08-04T03:54:20Z","updated_at":"2014-08-04T03:54:20Z","pushed_at":"2014-08-04T03:59:43Z","git_url":"git://github.com/noveogroup/university-ios-assignment-7.git","ssh_url":"git@github.com:noveogroup/university-ios-assignment-7.git","clone_url":"https://github.com/noveogroup/university-ios-assignment-7.git","svn_url":"https://github.com/noveogroup/university-ios-assignment-7","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1"},"html":{"href":"https://github.com/noveogroup/university-ios-assignment-7/pull/1"},"issue":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/1"},"comments":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/noveogroup/university-ios-assignment-7/statuses/f51b8775acca227b1f5c6634dd6f93ec02253396"}}}}