{"action":"created","comment":{"url":"https://api.github.com/repos/eastektw/henri_practice/pulls/comments/197660630","pull_request_review_id":131444855,"id":197660630,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzY2MDYzMA==","diff_hunk":"@@ -0,0 +1,340 @@\n+unit shape_data_type;\n+\n+{$mode objfpc}{$H+}\n+\n+interface\n+\n+uses\n+  Classes, SysUtils, Contnrs, Dialogs, tools;\n+\n+type\n+  { TShapeType }\n+\n+  TShapeType = (None, PointType, LineType);\n+\n+  { TShape }\n+\n+  TShape=class\n+    private\n+      NName:TShapeType;\n+\n+      function GetName:TShapeType;\n+      procedure SetName(AName:TShapeType);\n+    public\n+      property Name:TShapeType read GetName write SetName;\n+\n+      constructor create(AName:TShapeType);\n+  end;\n+\n+  { TPointShape }\n+\n+  TPointShape=class(TShape){change name}\n+    private\n+      NPoint:TPoint;{change to use TPoint}\n+      NRadius:Integer;\n+\n+      function GetPoint:TPoint;\n+      procedure SetPoint(APoint:TPoint);\n+      function GetRadius:Integer;\n+      procedure SetRadius(ARadius:Integer);\n+    public\n+      property Point:TPoint read GetPoint write SetPoint;\n+      property Radius:Integer read GetRadius write SetRadius;\n+\n+      constructor create(AName:TShapeType; APoint:TPoint; ARadius:Integer);overload;\n+  end;\n+\n+  { TLineShape }\n+\n+  TLineShape=class(TShape)\n+    private\n+      NStartPoint:TPoint;\n+      NEndPoint:TPoint;\n+      NRadius:Integer;\n+\n+      function GetStartPoint:TPoint;\n+      procedure SetStartPoint(APoint:TPoint);\n+      function GetEndPoint:TPoint;\n+      procedure SetEndPoint(APoint:TPoint);\n+      function GetRadius:Integer;\n+      procedure SetRadius(ARadius:Integer);\n+    public\n+      property StartPoint:TPoint read GetStartPoint write SetStartPoint;\n+      property EndPoint:TPoint read GetEndPoint write SetEndPoint;\n+      property Radius:Integer read GetRadius write SetRadius;\n+\n+      constructor create(AName:TShapeType; AStartPoint, AEndPoint:TPoint; ARadius:Integer);\n+  end;\n+\n+  procedure ReadFileIntoObjecList(AFileName:String; AObjectList:TObjectList; const ExpandValue: Integer);\n+  procedure WriteObjectListIntoFile(AFileName:String; AObjectList:TObjectList; const ExpandValue: Integer);\n+  procedure ClearEmptyStringElement(AStringList:TStringList);\n+  procedure CloneShapeObjectListTo(ATargetShapeObjectList, ASourceShapeObjectList: TObjectList);\n+  function IsStringListNum(AStringList:TStringList):Boolean;\n+\n+var\n+  ShapeObjectList:TObjectList;\n+\n+implementation\n+\n+procedure ReadFileIntoObjecList(AFileName: String; AObjectList: TObjectList; const ExpandValue: Integer);\n+const\n+  PointName='#P';\n+  LineName='#L';\n+var\n+  FileHandle:TextFile;\n+  TempString:String;\n+  TempStringList:TStringList;\n+  ShapeObject:TShape;\n+  ShapeName:TShapeType;\n+  ShapeRadius:LongInt;\n+  Point1, Point2:TPoint;\n+begin\n+  try\n+    AssignFile(FileHandle, AFileName);\n+    Reset(FileHandle);\n+    try\n+      while not EOF(FileHandle) do\n+      begin\n+        ReadLn(FileHandle, TempString);\n+        ShapeName:=None;\n+        TempStringList:=TStringList.Create;\n+        try\n+          if Length(TempString)<>0 then\n+          begin\n+            SplitString(TempStringList, TempString, ' ');\n+            ClearEmptyStringElement(TempStringList);\n+            if TempStringList[0]=PointName then ShapeName:=PointType\n+            else if TempStringList[0]=LineName then ShapeName:=LineType\n+            else ShapeName:=None;\n+\n+            TempStringList.Delete(0);\n+            ShapeRadius:=Trunc(StrToFloat(TempStringList[TempStringList.count-1])*ExpandValue);\n+\n+            if (TempStringList.Count>=2) and IsStringListNum(TempStringList) then\n+            begin\n+              Point1.X:=Trunc(StrToFloat(TempStringList[0])*ExpandValue);\n+              Point1.Y:=Trunc(StrToFloat(TempStringList[1])*ExpandValue);\n+\n+              if (TempStringList.Count=3) and (ShapeName=PointType) then\n+                ShapeObject:=TPointShape.create(ShapeName, Point1, ShapeRadius)\n+              else if (TempStringList.Count=5) and (ShapeName=LineType) then\n+              begin\n+                Point2.X:=Trunc(StrToFloat(TempStringList[2])*ExpandValue);\n+                Point2.Y:=Trunc(StrToFloat(TempStringList[3])*ExpandValue);\n+                ShapeObject:=TLineShape.create(ShapeName, Point1, Point2, ShapeRadius);\n+              end;\n+            end;\n+\n+            AObjectList.Add(ShapeObject);","path":"practice2/shape_data_type.pas","position":129,"original_position":129,"commit_id":"a6d3fb4f14e0b934208a38fba6d788abe5fcbb44","original_commit_id":"a6d3fb4f14e0b934208a38fba6d788abe5fcbb44","user":{"login":"djas1033","id":1267669,"node_id":"MDQ6VXNlcjEyNjc2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/1267669?v=4","gravatar_id":"","url":"https://api.github.com/users/djas1033","html_url":"https://github.com/djas1033","followers_url":"https://api.github.com/users/djas1033/followers","following_url":"https://api.github.com/users/djas1033/following{/other_user}","gists_url":"https://api.github.com/users/djas1033/gists{/gist_id}","starred_url":"https://api.github.com/users/djas1033/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djas1033/subscriptions","organizations_url":"https://api.github.com/users/djas1033/orgs","repos_url":"https://api.github.com/users/djas1033/repos","events_url":"https://api.github.com/users/djas1033/events{/privacy}","received_events_url":"https://api.github.com/users/djas1033/received_events","type":"User","site_admin":false},"body":"前面 if 在卡關， 怎麼會在 if 之外呼叫? ","created_at":"2018-06-25T01:07:51Z","updated_at":"2018-06-25T01:42:53Z","html_url":"https://github.com/eastektw/henri_practice/pull/6#discussion_r197660630","pull_request_url":"https://api.github.com/repos/eastektw/henri_practice/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/comments/197660630"},"html":{"href":"https://github.com/eastektw/henri_practice/pull/6#discussion_r197660630"},"pull_request":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/6"}},"in_reply_to_id":197660614},"pull_request":{"url":"https://api.github.com/repos/eastektw/henri_practice/pulls/6","id":196624298,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NjI0Mjk4","html_url":"https://github.com/eastektw/henri_practice/pull/6","diff_url":"https://github.com/eastektw/henri_practice/pull/6.diff","patch_url":"https://github.com/eastektw/henri_practice/pull/6.patch","issue_url":"https://api.github.com/repos/eastektw/henri_practice/issues/6","number":6,"state":"open","locked":false,"title":"Practice2 Finished!","user":{"login":"Henrijian","id":39718441,"node_id":"MDQ6VXNlcjM5NzE4NDQx","avatar_url":"https://avatars3.githubusercontent.com/u/39718441?v=4","gravatar_id":"","url":"https://api.github.com/users/Henrijian","html_url":"https://github.com/Henrijian","followers_url":"https://api.github.com/users/Henrijian/followers","following_url":"https://api.github.com/users/Henrijian/following{/other_user}","gists_url":"https://api.github.com/users/Henrijian/gists{/gist_id}","starred_url":"https://api.github.com/users/Henrijian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Henrijian/subscriptions","organizations_url":"https://api.github.com/users/Henrijian/orgs","repos_url":"https://api.github.com/users/Henrijian/repos","events_url":"https://api.github.com/users/Henrijian/events{/privacy}","received_events_url":"https://api.github.com/users/Henrijian/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-22T02:41:56Z","updated_at":"2018-06-25T01:42:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6df3b129dde522f6411c50f0e4f742851f9e45ad","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eastektw/henri_practice/pulls/6/commits","review_comments_url":"https://api.github.com/repos/eastektw/henri_practice/pulls/6/comments","review_comment_url":"https://api.github.com/repos/eastektw/henri_practice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eastektw/henri_practice/issues/6/comments","statuses_url":"https://api.github.com/repos/eastektw/henri_practice/statuses/a6d3fb4f14e0b934208a38fba6d788abe5fcbb44","head":{"label":"Henrijian:master","ref":"master","sha":"a6d3fb4f14e0b934208a38fba6d788abe5fcbb44","user":{"login":"Henrijian","id":39718441,"node_id":"MDQ6VXNlcjM5NzE4NDQx","avatar_url":"https://avatars3.githubusercontent.com/u/39718441?v=4","gravatar_id":"","url":"https://api.github.com/users/Henrijian","html_url":"https://github.com/Henrijian","followers_url":"https://api.github.com/users/Henrijian/followers","following_url":"https://api.github.com/users/Henrijian/following{/other_user}","gists_url":"https://api.github.com/users/Henrijian/gists{/gist_id}","starred_url":"https://api.github.com/users/Henrijian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Henrijian/subscriptions","organizations_url":"https://api.github.com/users/Henrijian/orgs","repos_url":"https://api.github.com/users/Henrijian/repos","events_url":"https://api.github.com/users/Henrijian/events{/privacy}","received_events_url":"https://api.github.com/users/Henrijian/received_events","type":"User","site_admin":false},"repo":{"id":135248738,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUyNDg3Mzg=","name":"henri_practice","full_name":"Henrijian/henri_practice","owner":{"login":"Henrijian","id":39718441,"node_id":"MDQ6VXNlcjM5NzE4NDQx","avatar_url":"https://avatars3.githubusercontent.com/u/39718441?v=4","gravatar_id":"","url":"https://api.github.com/users/Henrijian","html_url":"https://github.com/Henrijian","followers_url":"https://api.github.com/users/Henrijian/followers","following_url":"https://api.github.com/users/Henrijian/following{/other_user}","gists_url":"https://api.github.com/users/Henrijian/gists{/gist_id}","starred_url":"https://api.github.com/users/Henrijian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Henrijian/subscriptions","organizations_url":"https://api.github.com/users/Henrijian/orgs","repos_url":"https://api.github.com/users/Henrijian/repos","events_url":"https://api.github.com/users/Henrijian/events{/privacy}","received_events_url":"https://api.github.com/users/Henrijian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Henrijian/henri_practice","description":"Storing assignments of RD training for everyone to easily review these codes","fork":true,"url":"https://api.github.com/repos/Henrijian/henri_practice","forks_url":"https://api.github.com/repos/Henrijian/henri_practice/forks","keys_url":"https://api.github.com/repos/Henrijian/henri_practice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Henrijian/henri_practice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Henrijian/henri_practice/teams","hooks_url":"https://api.github.com/repos/Henrijian/henri_practice/hooks","issue_events_url":"https://api.github.com/repos/Henrijian/henri_practice/issues/events{/number}","events_url":"https://api.github.com/repos/Henrijian/henri_practice/events","assignees_url":"https://api.github.com/repos/Henrijian/henri_practice/assignees{/user}","branches_url":"https://api.github.com/repos/Henrijian/henri_practice/branches{/branch}","tags_url":"https://api.github.com/repos/Henrijian/henri_practice/tags","blobs_url":"https://api.github.com/repos/Henrijian/henri_practice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Henrijian/henri_practice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Henrijian/henri_practice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Henrijian/henri_practice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Henrijian/henri_practice/statuses/{sha}","languages_url":"https://api.github.com/repos/Henrijian/henri_practice/languages","stargazers_url":"https://api.github.com/repos/Henrijian/henri_practice/stargazers","contributors_url":"https://api.github.com/repos/Henrijian/henri_practice/contributors","subscribers_url":"https://api.github.com/repos/Henrijian/henri_practice/subscribers","subscription_url":"https://api.github.com/repos/Henrijian/henri_practice/subscription","commits_url":"https://api.github.com/repos/Henrijian/henri_practice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Henrijian/henri_practice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Henrijian/henri_practice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Henrijian/henri_practice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Henrijian/henri_practice/contents/{+path}","compare_url":"https://api.github.com/repos/Henrijian/henri_practice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Henrijian/henri_practice/merges","archive_url":"https://api.github.com/repos/Henrijian/henri_practice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Henrijian/henri_practice/downloads","issues_url":"https://api.github.com/repos/Henrijian/henri_practice/issues{/number}","pulls_url":"https://api.github.com/repos/Henrijian/henri_practice/pulls{/number}","milestones_url":"https://api.github.com/repos/Henrijian/henri_practice/milestones{/number}","notifications_url":"https://api.github.com/repos/Henrijian/henri_practice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Henrijian/henri_practice/labels{/name}","releases_url":"https://api.github.com/repos/Henrijian/henri_practice/releases{/id}","deployments_url":"https://api.github.com/repos/Henrijian/henri_practice/deployments","created_at":"2018-05-29T06:06:29Z","updated_at":"2018-06-22T02:40:33Z","pushed_at":"2018-06-22T02:40:31Z","git_url":"git://github.com/Henrijian/henri_practice.git","ssh_url":"git@github.com:Henrijian/henri_practice.git","clone_url":"https://github.com/Henrijian/henri_practice.git","svn_url":"https://github.com/Henrijian/henri_practice","homepage":"","size":9384,"stargazers_count":0,"watchers_count":0,"language":"Pascal","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eastektw:master","ref":"master","sha":"76237b5ae8dad69ed229247583a71b3e7cdddda5","user":{"login":"eastektw","id":8365260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzNjUyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/8365260?v=4","gravatar_id":"","url":"https://api.github.com/users/eastektw","html_url":"https://github.com/eastektw","followers_url":"https://api.github.com/users/eastektw/followers","following_url":"https://api.github.com/users/eastektw/following{/other_user}","gists_url":"https://api.github.com/users/eastektw/gists{/gist_id}","starred_url":"https://api.github.com/users/eastektw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eastektw/subscriptions","organizations_url":"https://api.github.com/users/eastektw/orgs","repos_url":"https://api.github.com/users/eastektw/repos","events_url":"https://api.github.com/users/eastektw/events{/privacy}","received_events_url":"https://api.github.com/users/eastektw/received_events","type":"Organization","site_admin":false},"repo":{"id":135235560,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUyMzU1NjA=","name":"henri_practice","full_name":"eastektw/henri_practice","owner":{"login":"eastektw","id":8365260,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzNjUyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/8365260?v=4","gravatar_id":"","url":"https://api.github.com/users/eastektw","html_url":"https://github.com/eastektw","followers_url":"https://api.github.com/users/eastektw/followers","following_url":"https://api.github.com/users/eastektw/following{/other_user}","gists_url":"https://api.github.com/users/eastektw/gists{/gist_id}","starred_url":"https://api.github.com/users/eastektw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eastektw/subscriptions","organizations_url":"https://api.github.com/users/eastektw/orgs","repos_url":"https://api.github.com/users/eastektw/repos","events_url":"https://api.github.com/users/eastektw/events{/privacy}","received_events_url":"https://api.github.com/users/eastektw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eastektw/henri_practice","description":null,"fork":false,"url":"https://api.github.com/repos/eastektw/henri_practice","forks_url":"https://api.github.com/repos/eastektw/henri_practice/forks","keys_url":"https://api.github.com/repos/eastektw/henri_practice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eastektw/henri_practice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eastektw/henri_practice/teams","hooks_url":"https://api.github.com/repos/eastektw/henri_practice/hooks","issue_events_url":"https://api.github.com/repos/eastektw/henri_practice/issues/events{/number}","events_url":"https://api.github.com/repos/eastektw/henri_practice/events","assignees_url":"https://api.github.com/repos/eastektw/henri_practice/assignees{/user}","branches_url":"https://api.github.com/repos/eastektw/henri_practice/branches{/branch}","tags_url":"https://api.github.com/repos/eastektw/henri_practice/tags","blobs_url":"https://api.github.com/repos/eastektw/henri_practice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eastektw/henri_practice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eastektw/henri_practice/git/refs{/sha}","trees_url":"https://api.github.com/repos/eastektw/henri_practice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eastektw/henri_practice/statuses/{sha}","languages_url":"https://api.github.com/repos/eastektw/henri_practice/languages","stargazers_url":"https://api.github.com/repos/eastektw/henri_practice/stargazers","contributors_url":"https://api.github.com/repos/eastektw/henri_practice/contributors","subscribers_url":"https://api.github.com/repos/eastektw/henri_practice/subscribers","subscription_url":"https://api.github.com/repos/eastektw/henri_practice/subscription","commits_url":"https://api.github.com/repos/eastektw/henri_practice/commits{/sha}","git_commits_url":"https://api.github.com/repos/eastektw/henri_practice/git/commits{/sha}","comments_url":"https://api.github.com/repos/eastektw/henri_practice/comments{/number}","issue_comment_url":"https://api.github.com/repos/eastektw/henri_practice/issues/comments{/number}","contents_url":"https://api.github.com/repos/eastektw/henri_practice/contents/{+path}","compare_url":"https://api.github.com/repos/eastektw/henri_practice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eastektw/henri_practice/merges","archive_url":"https://api.github.com/repos/eastektw/henri_practice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eastektw/henri_practice/downloads","issues_url":"https://api.github.com/repos/eastektw/henri_practice/issues{/number}","pulls_url":"https://api.github.com/repos/eastektw/henri_practice/pulls{/number}","milestones_url":"https://api.github.com/repos/eastektw/henri_practice/milestones{/number}","notifications_url":"https://api.github.com/repos/eastektw/henri_practice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eastektw/henri_practice/labels{/name}","releases_url":"https://api.github.com/repos/eastektw/henri_practice/releases{/id}","deployments_url":"https://api.github.com/repos/eastektw/henri_practice/deployments","created_at":"2018-05-29T03:15:57Z","updated_at":"2018-06-12T01:31:35Z","pushed_at":"2018-06-22T02:41:57Z","git_url":"git://github.com/eastektw/henri_practice.git","ssh_url":"git@github.com:eastektw/henri_practice.git","clone_url":"https://github.com/eastektw/henri_practice.git","svn_url":"https://github.com/eastektw/henri_practice","homepage":null,"size":9350,"stargazers_count":0,"watchers_count":0,"language":"Pascal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/6"},"html":{"href":"https://github.com/eastektw/henri_practice/pull/6"},"issue":{"href":"https://api.github.com/repos/eastektw/henri_practice/issues/6"},"comments":{"href":"https://api.github.com/repos/eastektw/henri_practice/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eastektw/henri_practice/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/eastektw/henri_practice/statuses/a6d3fb4f14e0b934208a38fba6d788abe5fcbb44"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"djas1033"}}