{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/xobjective-c/pulls/comments/80230930","id":80230930,"diff_hunk":"@@ -0,0 +1,73 @@\n+#import \"ClockExample.h\"\n+\n+@implementation Clock {\n+    int _hours, _minutes;\n+}\n+\n++ (Clock *)clockWithHours:(int)hours minutes:(int)minutes {\n+    return [[Clock alloc] initWithHours:hours minutes:minutes];\n+}\n+\n++ (Clock *)clockWithHours:(int)hours {\n+    return [[Clock alloc] initWithHours:hours minutes:0];\n+}\n+\n+- (instancetype)initWithHours:(int)hours minutes:(int)minutes {\n+    if (self = [super init]) {\n+        _hours = hours;\n+        _minutes = minutes;\n+        [self normalize];\n+    }\n+    \n+    return self;\n+}\n+\n+- (void)normalize {\n+    if (_minutes >= 60) {\n+        _hours += _minutes / 60;\n+        _minutes = _minutes % 60;\n+    }\n+    \n+    while (_minutes < 0) {\n+        _hours -= 1;\n+        _minutes += 60;\n+    }\n+    \n+    if (_hours >= 24) {\n+        _hours = _hours % 24;\n+    }\n+    \n+    while (_hours < 0) {\n+        _hours += 24;\n+    }\n+}\n+\n+- (Clock *)addMinutes:(int)minutes {\n+    return [Clock clockWithHours: _hours minutes: _minutes + minutes];\n+}\n+\n+- (Clock *)subtractMinutes:(int)minutes {\n+    return [self addMinutes:-minutes];\n+}\n+\n+- (NSString *)description {\n+    return [NSString stringWithFormat:@\"%.2d:%.2d\", _hours, _minutes];\n+}\n+\n+- (BOOL)isEqual:(id)object {\n+    if (self == object) {\n+        return YES;\n+    }\n+    \n+    if (![object isKindOfClass:[Clock class]]) {\n+        return NO;\n+    }\n+    \n+    return [self isEqualToClock:(Clock *)object];\n+}\n+\n+- (BOOL)isEqualToClock:(Clock *)clock {","path":"exercises/clock/ClockExample.m","position":69,"original_position":69,"commit_id":"08c0681162c2a69e761fb646452da984ab960495","original_commit_id":"541c333183c9fafe43f6e4c3b780df88e005c959","user":{"login":"robtimp","id":6910829,"avatar_url":"https://avatars.githubusercontent.com/u/6910829?v=3","gravatar_id":"","url":"https://api.github.com/users/robtimp","html_url":"https://github.com/robtimp","followers_url":"https://api.github.com/users/robtimp/followers","following_url":"https://api.github.com/users/robtimp/following{/other_user}","gists_url":"https://api.github.com/users/robtimp/gists{/gist_id}","starred_url":"https://api.github.com/users/robtimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtimp/subscriptions","organizations_url":"https://api.github.com/users/robtimp/orgs","repos_url":"https://api.github.com/users/robtimp/repos","events_url":"https://api.github.com/users/robtimp/events{/privacy}","received_events_url":"https://api.github.com/users/robtimp/received_events","type":"User","site_admin":false},"body":"So comparing hashes for an equality check could lead to a false positive.","created_at":"2016-09-23T12:01:16Z","updated_at":"2016-09-23T12:01:16Z","html_url":"https://github.com/exercism/xobjective-c/pull/123#discussion_r80230930","pull_request_url":"https://api.github.com/repos/exercism/xobjective-c/pulls/123","_links":{"self":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/comments/80230930"},"html":{"href":"https://github.com/exercism/xobjective-c/pull/123#discussion_r80230930"},"pull_request":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/123"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/xobjective-c/pulls/123","id":85905578,"html_url":"https://github.com/exercism/xobjective-c/pull/123","diff_url":"https://github.com/exercism/xobjective-c/pull/123.diff","patch_url":"https://github.com/exercism/xobjective-c/pull/123.patch","issue_url":"https://api.github.com/repos/exercism/xobjective-c/issues/123","number":123,"state":"open","locked":false,"title":"Add more exercises","user":{"login":"robtimp","id":6910829,"avatar_url":"https://avatars.githubusercontent.com/u/6910829?v=3","gravatar_id":"","url":"https://api.github.com/users/robtimp","html_url":"https://github.com/robtimp","followers_url":"https://api.github.com/users/robtimp/followers","following_url":"https://api.github.com/users/robtimp/following{/other_user}","gists_url":"https://api.github.com/users/robtimp/gists{/gist_id}","starred_url":"https://api.github.com/users/robtimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtimp/subscriptions","organizations_url":"https://api.github.com/users/robtimp/orgs","repos_url":"https://api.github.com/users/robtimp/repos","events_url":"https://api.github.com/users/robtimp/events{/privacy}","received_events_url":"https://api.github.com/users/robtimp/received_events","type":"User","site_admin":false},"body":"Add _Difference of Squares_, _Raindrops_, and _Clock_.","created_at":"2016-09-20T03:30:25Z","updated_at":"2016-09-23T12:01:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d3627cfe9546e1cd8329842ddf62d1a25f953f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/exercism/xobjective-c/pulls/123/commits","review_comments_url":"https://api.github.com/repos/exercism/xobjective-c/pulls/123/comments","review_comment_url":"https://api.github.com/repos/exercism/xobjective-c/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/xobjective-c/issues/123/comments","statuses_url":"https://api.github.com/repos/exercism/xobjective-c/statuses/08c0681162c2a69e761fb646452da984ab960495","head":{"label":"robtimp:more-exercises","ref":"more-exercises","sha":"08c0681162c2a69e761fb646452da984ab960495","user":{"login":"robtimp","id":6910829,"avatar_url":"https://avatars.githubusercontent.com/u/6910829?v=3","gravatar_id":"","url":"https://api.github.com/users/robtimp","html_url":"https://github.com/robtimp","followers_url":"https://api.github.com/users/robtimp/followers","following_url":"https://api.github.com/users/robtimp/following{/other_user}","gists_url":"https://api.github.com/users/robtimp/gists{/gist_id}","starred_url":"https://api.github.com/users/robtimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtimp/subscriptions","organizations_url":"https://api.github.com/users/robtimp/orgs","repos_url":"https://api.github.com/users/robtimp/repos","events_url":"https://api.github.com/users/robtimp/events{/privacy}","received_events_url":"https://api.github.com/users/robtimp/received_events","type":"User","site_admin":false},"repo":{"id":48864624,"name":"xobjective-c","full_name":"robtimp/xobjective-c","owner":{"login":"robtimp","id":6910829,"avatar_url":"https://avatars.githubusercontent.com/u/6910829?v=3","gravatar_id":"","url":"https://api.github.com/users/robtimp","html_url":"https://github.com/robtimp","followers_url":"https://api.github.com/users/robtimp/followers","following_url":"https://api.github.com/users/robtimp/following{/other_user}","gists_url":"https://api.github.com/users/robtimp/gists{/gist_id}","starred_url":"https://api.github.com/users/robtimp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtimp/subscriptions","organizations_url":"https://api.github.com/users/robtimp/orgs","repos_url":"https://api.github.com/users/robtimp/repos","events_url":"https://api.github.com/users/robtimp/events{/privacy}","received_events_url":"https://api.github.com/users/robtimp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robtimp/xobjective-c","description":"Exercism Exercises in Objective-C","fork":true,"url":"https://api.github.com/repos/robtimp/xobjective-c","forks_url":"https://api.github.com/repos/robtimp/xobjective-c/forks","keys_url":"https://api.github.com/repos/robtimp/xobjective-c/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robtimp/xobjective-c/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robtimp/xobjective-c/teams","hooks_url":"https://api.github.com/repos/robtimp/xobjective-c/hooks","issue_events_url":"https://api.github.com/repos/robtimp/xobjective-c/issues/events{/number}","events_url":"https://api.github.com/repos/robtimp/xobjective-c/events","assignees_url":"https://api.github.com/repos/robtimp/xobjective-c/assignees{/user}","branches_url":"https://api.github.com/repos/robtimp/xobjective-c/branches{/branch}","tags_url":"https://api.github.com/repos/robtimp/xobjective-c/tags","blobs_url":"https://api.github.com/repos/robtimp/xobjective-c/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robtimp/xobjective-c/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robtimp/xobjective-c/git/refs{/sha}","trees_url":"https://api.github.com/repos/robtimp/xobjective-c/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robtimp/xobjective-c/statuses/{sha}","languages_url":"https://api.github.com/repos/robtimp/xobjective-c/languages","stargazers_url":"https://api.github.com/repos/robtimp/xobjective-c/stargazers","contributors_url":"https://api.github.com/repos/robtimp/xobjective-c/contributors","subscribers_url":"https://api.github.com/repos/robtimp/xobjective-c/subscribers","subscription_url":"https://api.github.com/repos/robtimp/xobjective-c/subscription","commits_url":"https://api.github.com/repos/robtimp/xobjective-c/commits{/sha}","git_commits_url":"https://api.github.com/repos/robtimp/xobjective-c/git/commits{/sha}","comments_url":"https://api.github.com/repos/robtimp/xobjective-c/comments{/number}","issue_comment_url":"https://api.github.com/repos/robtimp/xobjective-c/issues/comments{/number}","contents_url":"https://api.github.com/repos/robtimp/xobjective-c/contents/{+path}","compare_url":"https://api.github.com/repos/robtimp/xobjective-c/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robtimp/xobjective-c/merges","archive_url":"https://api.github.com/repos/robtimp/xobjective-c/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robtimp/xobjective-c/downloads","issues_url":"https://api.github.com/repos/robtimp/xobjective-c/issues{/number}","pulls_url":"https://api.github.com/repos/robtimp/xobjective-c/pulls{/number}","milestones_url":"https://api.github.com/repos/robtimp/xobjective-c/milestones{/number}","notifications_url":"https://api.github.com/repos/robtimp/xobjective-c/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robtimp/xobjective-c/labels{/name}","releases_url":"https://api.github.com/repos/robtimp/xobjective-c/releases{/id}","deployments_url":"https://api.github.com/repos/robtimp/xobjective-c/deployments","created_at":"2015-12-31T23:08:49Z","updated_at":"2016-04-01T20:22:20Z","pushed_at":"2016-09-23T11:58:08Z","git_url":"git://github.com/robtimp/xobjective-c.git","ssh_url":"git@github.com:robtimp/xobjective-c.git","clone_url":"https://github.com/robtimp/xobjective-c.git","svn_url":"https://github.com/robtimp/xobjective-c","homepage":null,"size":191,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":"exercism:master","ref":"master","sha":"30942cf5c8aff5a776ddea3dba5903174bb3596a","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":17273522,"name":"xobjective-c","full_name":"exercism/xobjective-c","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/xobjective-c","description":"Exercism Exercises in Objective-C","fork":false,"url":"https://api.github.com/repos/exercism/xobjective-c","forks_url":"https://api.github.com/repos/exercism/xobjective-c/forks","keys_url":"https://api.github.com/repos/exercism/xobjective-c/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/xobjective-c/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/xobjective-c/teams","hooks_url":"https://api.github.com/repos/exercism/xobjective-c/hooks","issue_events_url":"https://api.github.com/repos/exercism/xobjective-c/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/xobjective-c/events","assignees_url":"https://api.github.com/repos/exercism/xobjective-c/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/xobjective-c/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/xobjective-c/tags","blobs_url":"https://api.github.com/repos/exercism/xobjective-c/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/xobjective-c/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/xobjective-c/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/xobjective-c/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/xobjective-c/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/xobjective-c/languages","stargazers_url":"https://api.github.com/repos/exercism/xobjective-c/stargazers","contributors_url":"https://api.github.com/repos/exercism/xobjective-c/contributors","subscribers_url":"https://api.github.com/repos/exercism/xobjective-c/subscribers","subscription_url":"https://api.github.com/repos/exercism/xobjective-c/subscription","commits_url":"https://api.github.com/repos/exercism/xobjective-c/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/xobjective-c/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/xobjective-c/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/xobjective-c/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/xobjective-c/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/xobjective-c/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/xobjective-c/merges","archive_url":"https://api.github.com/repos/exercism/xobjective-c/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/xobjective-c/downloads","issues_url":"https://api.github.com/repos/exercism/xobjective-c/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/xobjective-c/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/xobjective-c/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/xobjective-c/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/xobjective-c/labels{/name}","releases_url":"https://api.github.com/repos/exercism/xobjective-c/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/xobjective-c/deployments","created_at":"2014-02-28T03:04:58Z","updated_at":"2016-09-20T03:17:09Z","pushed_at":"2016-09-23T11:58:08Z","git_url":"git://github.com/exercism/xobjective-c.git","ssh_url":"git@github.com:exercism/xobjective-c.git","clone_url":"https://github.com/exercism/xobjective-c.git","svn_url":"https://github.com/exercism/xobjective-c","homepage":null,"size":23691,"stargazers_count":2,"watchers_count":2,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":4,"forks":13,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/123"},"html":{"href":"https://github.com/exercism/xobjective-c/pull/123"},"issue":{"href":"https://api.github.com/repos/exercism/xobjective-c/issues/123"},"comments":{"href":"https://api.github.com/repos/exercism/xobjective-c/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/xobjective-c/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/xobjective-c/statuses/08c0681162c2a69e761fb646452da984ab960495"}}}}
{"actor":{"display_login":"robtimp"}}