{"action":"created","comment":{"url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/comments/169760003","pull_request_review_id":98338669,"id":169760003,"diff_hunk":"@@ -12,33 +12,93 @@ let stacks = {\n   b: [],\n   c: []\n };\n+//moveCounter variable will determine if the user completed the puzzle with the least number of moves possible\n+let moveCounter = 0\n \n-function printStacks() {\n+const printStacks = () => {\n   console.log(\"a: \" + stacks.a);\n   console.log(\"b: \" + stacks.b);\n   console.log(\"c: \" + stacks.c);\n }\n \n-function movePiece() {\n-  // Your code here\n-\n+//the isItLegal function will be called back to determine if the input is valid.\n+const isItLegal = (startStack, endStack) => {\n+  if((startStack === \"a\" || startStack === \"b\" || startStack === \"c\") &&\n+     (endStack === \"a\" || endStack === \"b\" || endStack === \"c\")){\n+    return \"it is a valid input\"\n+  }else return \"it is not a valid input\"\n }\n \n-function isLegal() {\n-  // Your code here\n-\n+//assuming the input was deemed valid the movePiece function is called to check if the designated move\n+//is a valid move (if the number to be moved is larger than the number in the last position of the\n+//ending stack it is an ivalid move) If the move is valid the the number to be moved is .pop'ed off\n+// and added to the end of the ending stack, as well as adding one to the moveCounter.\n+const movePiece = (startStack, endStack) => {\n+  let blockToBeMoved = stacks[startStack].valueOf()[stacks[startStack].valueOf().length-1]\n+  let lastBlockOfFutureStack = stacks[endStack].valueOf()[stacks[endStack].valueOf().length-1]\n+  if((stacks[endStack].length === 0) || (blockToBeMoved < lastBlockOfFutureStack)){","path":"03week/towersOfHanoi.js","position":35,"original_position":35,"commit_id":"725df03d4ee88f3d9dad2b92bd2aa04c02ab7054","original_commit_id":"725df03d4ee88f3d9dad2b92bd2aa04c02ab7054","user":{"login":"reneedudley","id":12837355,"avatar_url":"https://avatars0.githubusercontent.com/u/12837355?v=4","gravatar_id":"","url":"https://api.github.com/users/reneedudley","html_url":"https://github.com/reneedudley","followers_url":"https://api.github.com/users/reneedudley/followers","following_url":"https://api.github.com/users/reneedudley/following{/other_user}","gists_url":"https://api.github.com/users/reneedudley/gists{/gist_id}","starred_url":"https://api.github.com/users/reneedudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reneedudley/subscriptions","organizations_url":"https://api.github.com/users/reneedudley/orgs","repos_url":"https://api.github.com/users/reneedudley/repos","events_url":"https://api.github.com/users/reneedudley/events{/privacy}","received_events_url":"https://api.github.com/users/reneedudley/received_events","type":"User","site_admin":false},"body":"functional programing best practice, you should return a truthy or falsy value","created_at":"2018-02-21T19:58:32Z","updated_at":"2018-02-21T20:00:55Z","html_url":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10#discussion_r169760003","pull_request_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/comments/169760003"},"html":{"href":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10#discussion_r169760003"},"pull_request":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10","id":168983741,"html_url":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10","diff_url":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10.diff","patch_url":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10.patch","issue_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/10","number":10,"state":"open","locked":false,"title":"recreation","user":{"login":"Ozzyjtjustin","id":35607292,"avatar_url":"https://avatars1.githubusercontent.com/u/35607292?v=4","gravatar_id":"","url":"https://api.github.com/users/Ozzyjtjustin","html_url":"https://github.com/Ozzyjtjustin","followers_url":"https://api.github.com/users/Ozzyjtjustin/followers","following_url":"https://api.github.com/users/Ozzyjtjustin/following{/other_user}","gists_url":"https://api.github.com/users/Ozzyjtjustin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ozzyjtjustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ozzyjtjustin/subscriptions","organizations_url":"https://api.github.com/users/Ozzyjtjustin/orgs","repos_url":"https://api.github.com/users/Ozzyjtjustin/repos","events_url":"https://api.github.com/users/Ozzyjtjustin/events{/privacy}","received_events_url":"https://api.github.com/users/Ozzyjtjustin/received_events","type":"User","site_admin":false},"body":"## Checkpoint Rubric\r\nThis is the rubric that your instructor will use to grade your checkpoints. Please do not edit. \r\n\r\n**Checkpoint 1**\r\n- [ ] All tests passed: 40 points\r\n- [ ] Proper use of documentation (commenting on code): 15 points\r\n- [ ] Properly indented code: 15 points\r\n- [ ] Demonstrated effective use of JavaScript: 30 points\r\n\r\n**Checkpoint 2**\r\n- [ ] The application works as it should: 40 points\r\n- [ ] Proper use of documentation (commenting on code): 15 points\r\n- [ ] Properly indented code: 15 points\r\n- [ ] Demonstrated effective use of JavaScript and the DOM API: 30 points\r\n\r\n**Checkpoint 3**\r\n- [ ] Use of React: 25 points\r\n- [ ] Accesses an API: 25 points\r\n- [ ] Proper use of documentation (commenting on code): 25 points\r\n- [ ] The application functions as it should: 25 points\r\n","created_at":"2018-02-13T23:21:34Z","updated_at":"2018-02-21T20:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22d98e3c755d654e4f435ec3f57946ca4ec456c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10/commits","review_comments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10/comments","review_comment_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/10/comments","statuses_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/statuses/725df03d4ee88f3d9dad2b92bd2aa04c02ab7054","head":{"label":"Ozzyjtjustin:class3-towersOfHanoi3","ref":"class3-towersOfHanoi3","sha":"725df03d4ee88f3d9dad2b92bd2aa04c02ab7054","user":{"login":"Ozzyjtjustin","id":35607292,"avatar_url":"https://avatars1.githubusercontent.com/u/35607292?v=4","gravatar_id":"","url":"https://api.github.com/users/Ozzyjtjustin","html_url":"https://github.com/Ozzyjtjustin","followers_url":"https://api.github.com/users/Ozzyjtjustin/followers","following_url":"https://api.github.com/users/Ozzyjtjustin/following{/other_user}","gists_url":"https://api.github.com/users/Ozzyjtjustin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ozzyjtjustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ozzyjtjustin/subscriptions","organizations_url":"https://api.github.com/users/Ozzyjtjustin/orgs","repos_url":"https://api.github.com/users/Ozzyjtjustin/repos","events_url":"https://api.github.com/users/Ozzyjtjustin/events{/privacy}","received_events_url":"https://api.github.com/users/Ozzyjtjustin/received_events","type":"User","site_admin":false},"repo":{"id":118153556,"name":"javascript-workbook","full_name":"Ozzyjtjustin/javascript-workbook","owner":{"login":"Ozzyjtjustin","id":35607292,"avatar_url":"https://avatars1.githubusercontent.com/u/35607292?v=4","gravatar_id":"","url":"https://api.github.com/users/Ozzyjtjustin","html_url":"https://github.com/Ozzyjtjustin","followers_url":"https://api.github.com/users/Ozzyjtjustin/followers","following_url":"https://api.github.com/users/Ozzyjtjustin/following{/other_user}","gists_url":"https://api.github.com/users/Ozzyjtjustin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ozzyjtjustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ozzyjtjustin/subscriptions","organizations_url":"https://api.github.com/users/Ozzyjtjustin/orgs","repos_url":"https://api.github.com/users/Ozzyjtjustin/repos","events_url":"https://api.github.com/users/Ozzyjtjustin/events{/privacy}","received_events_url":"https://api.github.com/users/Ozzyjtjustin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ozzyjtjustin/javascript-workbook","description":"https://austincodingacademy.github.io/javascript-workbook","fork":true,"url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook","forks_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/forks","keys_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/teams","hooks_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/hooks","issue_events_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/events{/number}","events_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/events","assignees_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/assignees{/user}","branches_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/branches{/branch}","tags_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/tags","blobs_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/statuses/{sha}","languages_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/languages","stargazers_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/stargazers","contributors_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/contributors","subscribers_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/subscribers","subscription_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/subscription","commits_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/contents/{+path}","compare_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/merges","archive_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/downloads","issues_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues{/number}","pulls_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls{/number}","milestones_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/milestones{/number}","notifications_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/labels{/name}","releases_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/releases{/id}","deployments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/deployments","created_at":"2018-01-19T17:03:10Z","updated_at":"2018-01-19T17:03:12Z","pushed_at":"2018-02-21T02:01:08Z","git_url":"git://github.com/Ozzyjtjustin/javascript-workbook.git","ssh_url":"git@github.com:Ozzyjtjustin/javascript-workbook.git","clone_url":"https://github.com/Ozzyjtjustin/javascript-workbook.git","svn_url":"https://github.com/Ozzyjtjustin/javascript-workbook","homepage":"","size":391,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"Ozzyjtjustin:gh-pages","ref":"gh-pages","sha":"b74f20ba047d64e456dd63061186c325d973920d","user":{"login":"Ozzyjtjustin","id":35607292,"avatar_url":"https://avatars1.githubusercontent.com/u/35607292?v=4","gravatar_id":"","url":"https://api.github.com/users/Ozzyjtjustin","html_url":"https://github.com/Ozzyjtjustin","followers_url":"https://api.github.com/users/Ozzyjtjustin/followers","following_url":"https://api.github.com/users/Ozzyjtjustin/following{/other_user}","gists_url":"https://api.github.com/users/Ozzyjtjustin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ozzyjtjustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ozzyjtjustin/subscriptions","organizations_url":"https://api.github.com/users/Ozzyjtjustin/orgs","repos_url":"https://api.github.com/users/Ozzyjtjustin/repos","events_url":"https://api.github.com/users/Ozzyjtjustin/events{/privacy}","received_events_url":"https://api.github.com/users/Ozzyjtjustin/received_events","type":"User","site_admin":false},"repo":{"id":118153556,"name":"javascript-workbook","full_name":"Ozzyjtjustin/javascript-workbook","owner":{"login":"Ozzyjtjustin","id":35607292,"avatar_url":"https://avatars1.githubusercontent.com/u/35607292?v=4","gravatar_id":"","url":"https://api.github.com/users/Ozzyjtjustin","html_url":"https://github.com/Ozzyjtjustin","followers_url":"https://api.github.com/users/Ozzyjtjustin/followers","following_url":"https://api.github.com/users/Ozzyjtjustin/following{/other_user}","gists_url":"https://api.github.com/users/Ozzyjtjustin/gists{/gist_id}","starred_url":"https://api.github.com/users/Ozzyjtjustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ozzyjtjustin/subscriptions","organizations_url":"https://api.github.com/users/Ozzyjtjustin/orgs","repos_url":"https://api.github.com/users/Ozzyjtjustin/repos","events_url":"https://api.github.com/users/Ozzyjtjustin/events{/privacy}","received_events_url":"https://api.github.com/users/Ozzyjtjustin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ozzyjtjustin/javascript-workbook","description":"https://austincodingacademy.github.io/javascript-workbook","fork":true,"url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook","forks_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/forks","keys_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/teams","hooks_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/hooks","issue_events_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/events{/number}","events_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/events","assignees_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/assignees{/user}","branches_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/branches{/branch}","tags_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/tags","blobs_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/statuses/{sha}","languages_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/languages","stargazers_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/stargazers","contributors_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/contributors","subscribers_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/subscribers","subscription_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/subscription","commits_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/contents/{+path}","compare_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/merges","archive_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/downloads","issues_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues{/number}","pulls_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls{/number}","milestones_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/milestones{/number}","notifications_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/labels{/name}","releases_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/releases{/id}","deployments_url":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/deployments","created_at":"2018-01-19T17:03:10Z","updated_at":"2018-01-19T17:03:12Z","pushed_at":"2018-02-21T02:01:08Z","git_url":"git://github.com/Ozzyjtjustin/javascript-workbook.git","ssh_url":"git@github.com:Ozzyjtjustin/javascript-workbook.git","clone_url":"https://github.com/Ozzyjtjustin/javascript-workbook.git","svn_url":"https://github.com/Ozzyjtjustin/javascript-workbook","homepage":"","size":391,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10"},"html":{"href":"https://github.com/Ozzyjtjustin/javascript-workbook/pull/10"},"issue":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/10"},"comments":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/Ozzyjtjustin/javascript-workbook/statuses/725df03d4ee88f3d9dad2b92bd2aa04c02ab7054"}},"author_association":"OWNER"}}
{"actor":{"display_login":"reneedudley"}}