{"action":"created","comment":{"url":"https://api.github.com/repos/havok13888/Master-Game/pulls/comments/214741185","pull_request_review_id":151857413,"id":214741185,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDc0MTE4NQ==","diff_hunk":"@@ -39,5 +46,78 @@ public void ResetTiles()\n                 }\n             }\n         }\n+\n+        public MapData LoadJson()\n+        {\n+            string fileName = \"Jay01.json\";\n+            string filePath = Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory())) + \"\\\\Assets\\\\Maps\\\\\" + fileName;\n+            using (StreamReader reader = new StreamReader(filePath))\n+            {\n+                string jsonStringData = reader.ReadToEnd();\n+\n+                if (!jsonStringData.Equals(\"\"))\n+                {\n+                    return JsonConvert.DeserializeObject<MapData>(jsonStringData);\n+                }\n+                else\n+                {\n+                    return null; //String data value cannot be empty.\n+                }\n+                \n+            }\n+        }\n+\n+        public class MapData\n+        {\n+            public string name { get; set; }\n+            public string version { get; set; }\n+            public int rows { get; set; }\n+            public int cols { get; set; }\n+            public Tiles [] tiles { get; set; }\n+            public Entities[] entities { get; set; }\n+        }\n+\n+        public class Tiles\n+        {\n+            public int type;\n+\n+            public int xCoord;\n+\n+            public int yCoord;\n+        }\n+\n+        public class Entities\n+        {\n+            public string type;\n+\n+            public string name;\n+\n+            public string healthPoints;\n+\n+            public string xCoord;\n+\n+            public string yCoord;\n+        }\n+\n+        private BaseTile GetTile(int typeNum)\n+        {\n+\n+            if((int)TileType.Grass == typeNum)\n+            {\n+                return new GrassTile(1, 1);\n+            } \n+            else if ((int)TileType.Lava == typeNum)\n+            {\n+                return new LavaTile(1, 1);\n+            } \n+            else if ((int)TileType.Water== typeNum)","path":"Master-Game/World/Map.cs","position":108,"original_position":108,"commit_id":"11fd89c2c5ac9dadf11c6da024e7a13d955d375c","original_commit_id":"11fd89c2c5ac9dadf11c6da024e7a13d955d375c","user":{"login":"havok13888","id":1217312,"node_id":"MDQ6VXNlcjEyMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1217312?v=4","gravatar_id":"","url":"https://api.github.com/users/havok13888","html_url":"https://github.com/havok13888","followers_url":"https://api.github.com/users/havok13888/followers","following_url":"https://api.github.com/users/havok13888/following{/other_user}","gists_url":"https://api.github.com/users/havok13888/gists{/gist_id}","starred_url":"https://api.github.com/users/havok13888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havok13888/subscriptions","organizations_url":"https://api.github.com/users/havok13888/orgs","repos_url":"https://api.github.com/users/havok13888/repos","events_url":"https://api.github.com/users/havok13888/events{/privacy}","received_events_url":"https://api.github.com/users/havok13888/received_events","type":"User","site_admin":false},"body":"space before ==","created_at":"2018-09-03T17:53:35Z","updated_at":"2018-09-03T17:53:35Z","html_url":"https://github.com/havok13888/Master-Game/pull/18#discussion_r214741185","pull_request_url":"https://api.github.com/repos/havok13888/Master-Game/pulls/18","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/comments/214741185"},"html":{"href":"https://github.com/havok13888/Master-Game/pull/18#discussion_r214741185"},"pull_request":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/havok13888/Master-Game/pulls/18","id":212563786,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNTYzNzg2","html_url":"https://github.com/havok13888/Master-Game/pull/18","diff_url":"https://github.com/havok13888/Master-Game/pull/18.diff","patch_url":"https://github.com/havok13888/Master-Game/pull/18.patch","issue_url":"https://api.github.com/repos/havok13888/Master-Game/issues/18","number":18,"state":"open","locked":false,"title":"Map json jay","user":{"login":"jamiahuswalton","id":16068580,"node_id":"MDQ6VXNlcjE2MDY4NTgw","avatar_url":"https://avatars1.githubusercontent.com/u/16068580?v=4","gravatar_id":"","url":"https://api.github.com/users/jamiahuswalton","html_url":"https://github.com/jamiahuswalton","followers_url":"https://api.github.com/users/jamiahuswalton/followers","following_url":"https://api.github.com/users/jamiahuswalton/following{/other_user}","gists_url":"https://api.github.com/users/jamiahuswalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiahuswalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiahuswalton/subscriptions","organizations_url":"https://api.github.com/users/jamiahuswalton/orgs","repos_url":"https://api.github.com/users/jamiahuswalton/repos","events_url":"https://api.github.com/users/jamiahuswalton/events{/privacy}","received_events_url":"https://api.github.com/users/jamiahuswalton/received_events","type":"User","site_admin":false},"body":"#15 \r\n\r\nAdded a map define in a JSON file format. \r\n\r\nI also added lines of code to read from this file. \r\n\r\nI also had to change the output of TileAt method in the Map.cs. Otherwise, it was not displaying correctly. \r\n\r\nLet me know what you think!","created_at":"2018-09-01T20:52:38Z","updated_at":"2018-09-03T17:53:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d5f2ff2aa739bccf7431a9f0096423782cc012b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/havok13888/Master-Game/pulls/18/commits","review_comments_url":"https://api.github.com/repos/havok13888/Master-Game/pulls/18/comments","review_comment_url":"https://api.github.com/repos/havok13888/Master-Game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/havok13888/Master-Game/issues/18/comments","statuses_url":"https://api.github.com/repos/havok13888/Master-Game/statuses/11fd89c2c5ac9dadf11c6da024e7a13d955d375c","head":{"label":"havok13888:map-JSON-Jay","ref":"map-JSON-Jay","sha":"11fd89c2c5ac9dadf11c6da024e7a13d955d375c","user":{"login":"havok13888","id":1217312,"node_id":"MDQ6VXNlcjEyMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1217312?v=4","gravatar_id":"","url":"https://api.github.com/users/havok13888","html_url":"https://github.com/havok13888","followers_url":"https://api.github.com/users/havok13888/followers","following_url":"https://api.github.com/users/havok13888/following{/other_user}","gists_url":"https://api.github.com/users/havok13888/gists{/gist_id}","starred_url":"https://api.github.com/users/havok13888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havok13888/subscriptions","organizations_url":"https://api.github.com/users/havok13888/orgs","repos_url":"https://api.github.com/users/havok13888/repos","events_url":"https://api.github.com/users/havok13888/events{/privacy}","received_events_url":"https://api.github.com/users/havok13888/received_events","type":"User","site_admin":false},"repo":{"id":141367212,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEzNjcyMTI=","name":"Master-Game","full_name":"havok13888/Master-Game","owner":{"login":"havok13888","id":1217312,"node_id":"MDQ6VXNlcjEyMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1217312?v=4","gravatar_id":"","url":"https://api.github.com/users/havok13888","html_url":"https://github.com/havok13888","followers_url":"https://api.github.com/users/havok13888/followers","following_url":"https://api.github.com/users/havok13888/following{/other_user}","gists_url":"https://api.github.com/users/havok13888/gists{/gist_id}","starred_url":"https://api.github.com/users/havok13888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havok13888/subscriptions","organizations_url":"https://api.github.com/users/havok13888/orgs","repos_url":"https://api.github.com/users/havok13888/repos","events_url":"https://api.github.com/users/havok13888/events{/privacy}","received_events_url":"https://api.github.com/users/havok13888/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/havok13888/Master-Game","description":"Game project for programming class students","fork":false,"url":"https://api.github.com/repos/havok13888/Master-Game","forks_url":"https://api.github.com/repos/havok13888/Master-Game/forks","keys_url":"https://api.github.com/repos/havok13888/Master-Game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/havok13888/Master-Game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/havok13888/Master-Game/teams","hooks_url":"https://api.github.com/repos/havok13888/Master-Game/hooks","issue_events_url":"https://api.github.com/repos/havok13888/Master-Game/issues/events{/number}","events_url":"https://api.github.com/repos/havok13888/Master-Game/events","assignees_url":"https://api.github.com/repos/havok13888/Master-Game/assignees{/user}","branches_url":"https://api.github.com/repos/havok13888/Master-Game/branches{/branch}","tags_url":"https://api.github.com/repos/havok13888/Master-Game/tags","blobs_url":"https://api.github.com/repos/havok13888/Master-Game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/havok13888/Master-Game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/havok13888/Master-Game/git/refs{/sha}","trees_url":"https://api.github.com/repos/havok13888/Master-Game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/havok13888/Master-Game/statuses/{sha}","languages_url":"https://api.github.com/repos/havok13888/Master-Game/languages","stargazers_url":"https://api.github.com/repos/havok13888/Master-Game/stargazers","contributors_url":"https://api.github.com/repos/havok13888/Master-Game/contributors","subscribers_url":"https://api.github.com/repos/havok13888/Master-Game/subscribers","subscription_url":"https://api.github.com/repos/havok13888/Master-Game/subscription","commits_url":"https://api.github.com/repos/havok13888/Master-Game/commits{/sha}","git_commits_url":"https://api.github.com/repos/havok13888/Master-Game/git/commits{/sha}","comments_url":"https://api.github.com/repos/havok13888/Master-Game/comments{/number}","issue_comment_url":"https://api.github.com/repos/havok13888/Master-Game/issues/comments{/number}","contents_url":"https://api.github.com/repos/havok13888/Master-Game/contents/{+path}","compare_url":"https://api.github.com/repos/havok13888/Master-Game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/havok13888/Master-Game/merges","archive_url":"https://api.github.com/repos/havok13888/Master-Game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/havok13888/Master-Game/downloads","issues_url":"https://api.github.com/repos/havok13888/Master-Game/issues{/number}","pulls_url":"https://api.github.com/repos/havok13888/Master-Game/pulls{/number}","milestones_url":"https://api.github.com/repos/havok13888/Master-Game/milestones{/number}","notifications_url":"https://api.github.com/repos/havok13888/Master-Game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/havok13888/Master-Game/labels{/name}","releases_url":"https://api.github.com/repos/havok13888/Master-Game/releases{/id}","deployments_url":"https://api.github.com/repos/havok13888/Master-Game/deployments","created_at":"2018-07-18T01:57:21Z","updated_at":"2018-09-03T02:32:28Z","pushed_at":"2018-09-03T13:55:42Z","git_url":"git://github.com/havok13888/Master-Game.git","ssh_url":"git@github.com:havok13888/Master-Game.git","clone_url":"https://github.com/havok13888/Master-Game.git","svn_url":"https://github.com/havok13888/Master-Game","homepage":"","size":53,"stargazers_count":1,"watchers_count":1,"language":"C#","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":7,"license":null,"forks":1,"open_issues":7,"watchers":1,"default_branch":"master"}},"base":{"label":"havok13888:master","ref":"master","sha":"a4ac50c083bd12b2064ab97f7e595fd0a49ff7c5","user":{"login":"havok13888","id":1217312,"node_id":"MDQ6VXNlcjEyMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1217312?v=4","gravatar_id":"","url":"https://api.github.com/users/havok13888","html_url":"https://github.com/havok13888","followers_url":"https://api.github.com/users/havok13888/followers","following_url":"https://api.github.com/users/havok13888/following{/other_user}","gists_url":"https://api.github.com/users/havok13888/gists{/gist_id}","starred_url":"https://api.github.com/users/havok13888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havok13888/subscriptions","organizations_url":"https://api.github.com/users/havok13888/orgs","repos_url":"https://api.github.com/users/havok13888/repos","events_url":"https://api.github.com/users/havok13888/events{/privacy}","received_events_url":"https://api.github.com/users/havok13888/received_events","type":"User","site_admin":false},"repo":{"id":141367212,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEzNjcyMTI=","name":"Master-Game","full_name":"havok13888/Master-Game","owner":{"login":"havok13888","id":1217312,"node_id":"MDQ6VXNlcjEyMTczMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1217312?v=4","gravatar_id":"","url":"https://api.github.com/users/havok13888","html_url":"https://github.com/havok13888","followers_url":"https://api.github.com/users/havok13888/followers","following_url":"https://api.github.com/users/havok13888/following{/other_user}","gists_url":"https://api.github.com/users/havok13888/gists{/gist_id}","starred_url":"https://api.github.com/users/havok13888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havok13888/subscriptions","organizations_url":"https://api.github.com/users/havok13888/orgs","repos_url":"https://api.github.com/users/havok13888/repos","events_url":"https://api.github.com/users/havok13888/events{/privacy}","received_events_url":"https://api.github.com/users/havok13888/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/havok13888/Master-Game","description":"Game project for programming class students","fork":false,"url":"https://api.github.com/repos/havok13888/Master-Game","forks_url":"https://api.github.com/repos/havok13888/Master-Game/forks","keys_url":"https://api.github.com/repos/havok13888/Master-Game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/havok13888/Master-Game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/havok13888/Master-Game/teams","hooks_url":"https://api.github.com/repos/havok13888/Master-Game/hooks","issue_events_url":"https://api.github.com/repos/havok13888/Master-Game/issues/events{/number}","events_url":"https://api.github.com/repos/havok13888/Master-Game/events","assignees_url":"https://api.github.com/repos/havok13888/Master-Game/assignees{/user}","branches_url":"https://api.github.com/repos/havok13888/Master-Game/branches{/branch}","tags_url":"https://api.github.com/repos/havok13888/Master-Game/tags","blobs_url":"https://api.github.com/repos/havok13888/Master-Game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/havok13888/Master-Game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/havok13888/Master-Game/git/refs{/sha}","trees_url":"https://api.github.com/repos/havok13888/Master-Game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/havok13888/Master-Game/statuses/{sha}","languages_url":"https://api.github.com/repos/havok13888/Master-Game/languages","stargazers_url":"https://api.github.com/repos/havok13888/Master-Game/stargazers","contributors_url":"https://api.github.com/repos/havok13888/Master-Game/contributors","subscribers_url":"https://api.github.com/repos/havok13888/Master-Game/subscribers","subscription_url":"https://api.github.com/repos/havok13888/Master-Game/subscription","commits_url":"https://api.github.com/repos/havok13888/Master-Game/commits{/sha}","git_commits_url":"https://api.github.com/repos/havok13888/Master-Game/git/commits{/sha}","comments_url":"https://api.github.com/repos/havok13888/Master-Game/comments{/number}","issue_comment_url":"https://api.github.com/repos/havok13888/Master-Game/issues/comments{/number}","contents_url":"https://api.github.com/repos/havok13888/Master-Game/contents/{+path}","compare_url":"https://api.github.com/repos/havok13888/Master-Game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/havok13888/Master-Game/merges","archive_url":"https://api.github.com/repos/havok13888/Master-Game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/havok13888/Master-Game/downloads","issues_url":"https://api.github.com/repos/havok13888/Master-Game/issues{/number}","pulls_url":"https://api.github.com/repos/havok13888/Master-Game/pulls{/number}","milestones_url":"https://api.github.com/repos/havok13888/Master-Game/milestones{/number}","notifications_url":"https://api.github.com/repos/havok13888/Master-Game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/havok13888/Master-Game/labels{/name}","releases_url":"https://api.github.com/repos/havok13888/Master-Game/releases{/id}","deployments_url":"https://api.github.com/repos/havok13888/Master-Game/deployments","created_at":"2018-07-18T01:57:21Z","updated_at":"2018-09-03T02:32:28Z","pushed_at":"2018-09-03T13:55:42Z","git_url":"git://github.com/havok13888/Master-Game.git","ssh_url":"git@github.com:havok13888/Master-Game.git","clone_url":"https://github.com/havok13888/Master-Game.git","svn_url":"https://github.com/havok13888/Master-Game","homepage":"","size":53,"stargazers_count":1,"watchers_count":1,"language":"C#","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":7,"license":null,"forks":1,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/18"},"html":{"href":"https://github.com/havok13888/Master-Game/pull/18"},"issue":{"href":"https://api.github.com/repos/havok13888/Master-Game/issues/18"},"comments":{"href":"https://api.github.com/repos/havok13888/Master-Game/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/havok13888/Master-Game/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/havok13888/Master-Game/statuses/11fd89c2c5ac9dadf11c6da024e7a13d955d375c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"havok13888"}}