{"action":"created","comment":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/comments/197395420","pull_request_review_id":131124819,"id":197395420,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzM5NTQyMA==","diff_hunk":"@@ -0,0 +1,212 @@\n+#include <iostream>\r","path":"marahgh/assignment3/wordSearch.cpp","position":1,"original_position":1,"commit_id":"da61c3ec32c811fedfd6a9153a82a8d21a17e57a","original_commit_id":"da61c3ec32c811fedfd6a9153a82a8d21a17e57a","user":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"body":"It would make code more re-usable, if we split it into a `WordSearch.h` and `WordSearch.cpp` pair of files.\r\nIn fact, you might consider making the grid and dictionary their own pair of files.\r\nThis means you can reuse these more easily.\r\nAlso, at the moment, most of your methods are defined inline within the class declaration: this makes it harder to understand the structure of the class.\r\n\r\nFor example:\r\n\r\n`grid.h`\r\n```c++\r\n/*The grid class, contains lower-case letters from whichever alphabet the dictionary uses.*/\r\nclass Grid {\r\n  char** matrix;\r\n  int rows;\r\n  int cols;\r\n  bool empty;\r\n\r\n public:\r\n  /*creates an empty grid,\r\n  a grid with the given dimensions filled by ' ' charachters*/\r\n  Grid(int rows, int cols);\r\n  /*receives a vector of the charachters to to fill the grid with,\r\n  grid's rows number and grid's columns number.\r\n  creates the grid if the dimensions are OK , otherwise creats an empty grid*/\r\n  Grid(vector<char> chars, int rows, int cols);\r\n  /*Fills the grid with the given values*/\r\n  bool fillGrid(vector<char> chars);\r\n  /*Grid's destructor*/\r\n  ~Grid();\r\n  /*returns the grid's rows number*/\r\n  int getRows() { return rows; }\r\n  /*returns the grid's columns number*/\r\n  int getCols() { return cols; }\r\n  /*return true if the grid is empty, and false otherwise*/\r\n  bool isEmpty() { return empty; }\r\n  char* operator[](int i);\r\n};\r\n```\r\n\r\n`grid.cpp`\r\n```c++\r\n#include \"grid.h\"\r\n\r\nGrid::Grid(int rows, int cols)\r\n    : matrix(nullptr), rows(rows), cols(cols), empty(true) {\r\n  matrix = new char*[rows];\r\n  for (int i = 0; i < rows; i++) {\r\n    matrix[i] = new char[cols];\r\n  }\r\n  vector<char> chars = vector<char>((rows * cols), ' ');\r\n  empty = true;\r\n  fillGrid(chars);\r\n}\r\n\r\n...\r\n```\r\n\r\nLooking at this, it also seems to me that `fillChars()` should not be public (which was not obvious in the previous form).","created_at":"2018-06-22T09:46:52Z","updated_at":"2018-06-22T09:50:10Z","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20#discussion_r197395420","pull_request_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/comments/197395420"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20#discussion_r197395420"},"pull_request":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20","id":195894660,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODk0NjYw","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20","diff_url":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20.diff","patch_url":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20.patch","issue_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/20","number":20,"state":"open","locked":false,"title":"Add files via upload","user":{"login":"marahgh","id":38587935,"node_id":"MDQ6VXNlcjM4NTg3OTM1","avatar_url":"https://avatars1.githubusercontent.com/u/38587935?v=4","gravatar_id":"","url":"https://api.github.com/users/marahgh","html_url":"https://github.com/marahgh","followers_url":"https://api.github.com/users/marahgh/followers","following_url":"https://api.github.com/users/marahgh/following{/other_user}","gists_url":"https://api.github.com/users/marahgh/gists{/gist_id}","starred_url":"https://api.github.com/users/marahgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marahgh/subscriptions","organizations_url":"https://api.github.com/users/marahgh/orgs","repos_url":"https://api.github.com/users/marahgh/repos","events_url":"https://api.github.com/users/marahgh/events{/privacy}","received_events_url":"https://api.github.com/users/marahgh/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-19T16:57:22Z","updated_at":"2018-06-22T09:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88de03168ac891e1b838f5ff415f7b0e3805d9cf","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ssancho2","id":28534702,"node_id":"MDQ6VXNlcjI4NTM0NzAy","avatar_url":"https://avatars3.githubusercontent.com/u/28534702?v=4","gravatar_id":"","url":"https://api.github.com/users/ssancho2","html_url":"https://github.com/ssancho2","followers_url":"https://api.github.com/users/ssancho2/followers","following_url":"https://api.github.com/users/ssancho2/following{/other_user}","gists_url":"https://api.github.com/users/ssancho2/gists{/gist_id}","starred_url":"https://api.github.com/users/ssancho2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssancho2/subscriptions","organizations_url":"https://api.github.com/users/ssancho2/orgs","repos_url":"https://api.github.com/users/ssancho2/repos","events_url":"https://api.github.com/users/ssancho2/events{/privacy}","received_events_url":"https://api.github.com/users/ssancho2/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20/commits","review_comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20/comments","review_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/20/comments","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/statuses/da61c3ec32c811fedfd6a9153a82a8d21a17e57a","head":{"label":"flerdacodeu:marahgh-3","ref":"marahgh-3","sha":"da61c3ec32c811fedfd6a9153a82a8d21a17e57a","user":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326673,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMzMjY2NzM=","name":"CodeU-2018-Group9","full_name":"flerdacodeu/CodeU-2018-Group9","owner":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group9","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/deployments","created_at":"2018-05-14T08:07:19Z","updated_at":"2018-06-16T13:05:29Z","pushed_at":"2018-06-20T17:01:13Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group9.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group9.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group9.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group9","homepage":null,"size":1348,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"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":"flerdacodeu:master","ref":"master","sha":"81eecf068db95f6fef142304e5476c55128874dd","user":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326673,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMzMjY2NzM=","name":"CodeU-2018-Group9","full_name":"flerdacodeu/CodeU-2018-Group9","owner":{"login":"flerdacodeu","id":28591648,"node_id":"MDQ6VXNlcjI4NTkxNjQ4","avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group9","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/deployments","created_at":"2018-05-14T08:07:19Z","updated_at":"2018-06-16T13:05:29Z","pushed_at":"2018-06-20T17:01:13Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group9.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group9.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group9.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group9","homepage":null,"size":1348,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"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/flerdacodeu/CodeU-2018-Group9/pulls/20"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group9/pull/20"},"issue":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/20"},"comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group9/statuses/da61c3ec32c811fedfd6a9153a82a8d21a17e57a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"flerdacodeu"}}