{"action":"created","comment":{"url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/comments/39453701","id":39453701,"diff_hunk":"@@ -0,0 +1,134 @@\n+var INITIAL_STEP_TIMEOUT = 10;\n+var stepTimeout = INITIAL_STEP_TIMEOUT;\n+\n+function slowStep() {\n+  var rows = $('.row').size()\n+    , cols = $('.row')[0].childElementCount\n+    , start_cell = $('.start').attr('id').split('_')\n+    , end_cell   = $('.end').attr('id').split('_')\n+    , x = parseInt(start_cell[0])\n+    , y = parseInt(start_cell[1]);\n+\n+  end_point = { x : end_cell[0], y : end_cell[1] };\n+\n+  printStep('starting point: (' + x + ', ' + y + ')');\n+  printStep('starting point: (' + end_point['x'] + ', ' + end_point['y'] + ')');\n+\n+  stepTimeout = INITIAL_STEP_TIMEOUT;\n+  setTimeout(function() { oneStep(x, y) }, INITIAL_STEP_TIMEOUT);\n+}\n+\n+function oneStep(x, y) {\n+  var wallValue = cellValue(x, y);\n+  var keepGoing = true;\n+  var goBack = false;\n+  var paths = 0;\n+  var possible = [];\n+\n+  stepTimeout = stepTimeout - 10;\n+\n+  if (stepTimeout < 0) {\n+    stepTimeout = INITIAL_STEP_TIMEOUT;\n+  }\n+\n+  if(!((x == parseInt(end_point['x'])) && (y == parseInt(end_point['y'])))){\n+    if((wallValue & E) > 0 && !alreadyVisited(x + 1, y) && !deadEnd(x + 1, y)){\n+      possible.push({x: x + 1, y: y});\n+      paths++;\n+    }\n+    if((wallValue & S) > 0 && !alreadyVisited(x, y + 1) && !deadEnd(x, y + 1)){\n+      possible.push({x: x, y: y + 1});\n+      paths++;\n+    }\n+    if((wallValue & W) > 0 && !alreadyVisited(x - 1, y) && !deadEnd(x - 1, y)){","path":"js/stepper.js","position":43,"original_position":43,"commit_id":"986579b72bd8b4f2331a7a32b3ba7cce6ddaaa03","original_commit_id":"986579b72bd8b4f2331a7a32b3ba7cce6ddaaa03","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Unexpected use of '&'.","created_at":"2015-09-14T22:07:52Z","updated_at":"2015-09-14T22:07:52Z","html_url":"https://github.com/QuantumGeordie/maze/pull/2#discussion_r39453701","pull_request_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/comments/39453701"},"html":{"href":"https://github.com/QuantumGeordie/maze/pull/2#discussion_r39453701"},"pull_request":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2","id":44987169,"html_url":"https://github.com/QuantumGeordie/maze/pull/2","diff_url":"https://github.com/QuantumGeordie/maze/pull/2.diff","patch_url":"https://github.com/QuantumGeordie/maze/pull/2.patch","issue_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/2","number":2,"state":"open","locked":false,"title":"add the new solver routine that shows the solving progress.","user":{"login":"QuantumGeordie","id":667992,"avatar_url":"https://avatars.githubusercontent.com/u/667992?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumGeordie","html_url":"https://github.com/QuantumGeordie","followers_url":"https://api.github.com/users/QuantumGeordie/followers","following_url":"https://api.github.com/users/QuantumGeordie/following{/other_user}","gists_url":"https://api.github.com/users/QuantumGeordie/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumGeordie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumGeordie/subscriptions","organizations_url":"https://api.github.com/users/QuantumGeordie/orgs","repos_url":"https://api.github.com/users/QuantumGeordie/repos","events_url":"https://api.github.com/users/QuantumGeordie/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumGeordie/received_events","type":"User","site_admin":false},"body":"duplicate the solver logic in a stepper routing that instead\r\nof using recursive calls to the solve method, uses setTimeout.\r\nThis allows us to watch the progress of the solver.\r\n\r\nit should also keep the stack depth low so that it can solve any\r\nsize maze.","created_at":"2015-09-14T22:07:47Z","updated_at":"2015-09-14T22:07:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a09836c847cef0e0e5359dbc2ead7a40286474c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2/commits","review_comments_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2/comments","review_comment_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/2/comments","statuses_url":"https://api.github.com/repos/QuantumGeordie/maze/statuses/986579b72bd8b4f2331a7a32b3ba7cce6ddaaa03","head":{"label":"QuantumGeordie:slow_solver","ref":"slow_solver","sha":"986579b72bd8b4f2331a7a32b3ba7cce6ddaaa03","user":{"login":"QuantumGeordie","id":667992,"avatar_url":"https://avatars.githubusercontent.com/u/667992?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumGeordie","html_url":"https://github.com/QuantumGeordie","followers_url":"https://api.github.com/users/QuantumGeordie/followers","following_url":"https://api.github.com/users/QuantumGeordie/following{/other_user}","gists_url":"https://api.github.com/users/QuantumGeordie/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumGeordie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumGeordie/subscriptions","organizations_url":"https://api.github.com/users/QuantumGeordie/orgs","repos_url":"https://api.github.com/users/QuantumGeordie/repos","events_url":"https://api.github.com/users/QuantumGeordie/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumGeordie/received_events","type":"User","site_admin":false},"repo":{"id":29457727,"name":"maze","full_name":"QuantumGeordie/maze","owner":{"login":"QuantumGeordie","id":667992,"avatar_url":"https://avatars.githubusercontent.com/u/667992?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumGeordie","html_url":"https://github.com/QuantumGeordie","followers_url":"https://api.github.com/users/QuantumGeordie/followers","following_url":"https://api.github.com/users/QuantumGeordie/following{/other_user}","gists_url":"https://api.github.com/users/QuantumGeordie/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumGeordie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumGeordie/subscriptions","organizations_url":"https://api.github.com/users/QuantumGeordie/orgs","repos_url":"https://api.github.com/users/QuantumGeordie/repos","events_url":"https://api.github.com/users/QuantumGeordie/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumGeordie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/QuantumGeordie/maze","description":"javascript maze generator and solver","fork":false,"url":"https://api.github.com/repos/QuantumGeordie/maze","forks_url":"https://api.github.com/repos/QuantumGeordie/maze/forks","keys_url":"https://api.github.com/repos/QuantumGeordie/maze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantumGeordie/maze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantumGeordie/maze/teams","hooks_url":"https://api.github.com/repos/QuantumGeordie/maze/hooks","issue_events_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/events{/number}","events_url":"https://api.github.com/repos/QuantumGeordie/maze/events","assignees_url":"https://api.github.com/repos/QuantumGeordie/maze/assignees{/user}","branches_url":"https://api.github.com/repos/QuantumGeordie/maze/branches{/branch}","tags_url":"https://api.github.com/repos/QuantumGeordie/maze/tags","blobs_url":"https://api.github.com/repos/QuantumGeordie/maze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantumGeordie/maze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantumGeordie/maze/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantumGeordie/maze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantumGeordie/maze/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantumGeordie/maze/languages","stargazers_url":"https://api.github.com/repos/QuantumGeordie/maze/stargazers","contributors_url":"https://api.github.com/repos/QuantumGeordie/maze/contributors","subscribers_url":"https://api.github.com/repos/QuantumGeordie/maze/subscribers","subscription_url":"https://api.github.com/repos/QuantumGeordie/maze/subscription","commits_url":"https://api.github.com/repos/QuantumGeordie/maze/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantumGeordie/maze/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantumGeordie/maze/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantumGeordie/maze/contents/{+path}","compare_url":"https://api.github.com/repos/QuantumGeordie/maze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantumGeordie/maze/merges","archive_url":"https://api.github.com/repos/QuantumGeordie/maze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantumGeordie/maze/downloads","issues_url":"https://api.github.com/repos/QuantumGeordie/maze/issues{/number}","pulls_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantumGeordie/maze/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantumGeordie/maze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantumGeordie/maze/labels{/name}","releases_url":"https://api.github.com/repos/QuantumGeordie/maze/releases{/id}","created_at":"2015-01-19T06:48:55Z","updated_at":"2015-02-19T19:12:10Z","pushed_at":"2015-09-14T22:07:47Z","git_url":"git://github.com/QuantumGeordie/maze.git","ssh_url":"git@github.com:QuantumGeordie/maze.git","clone_url":"https://github.com/QuantumGeordie/maze.git","svn_url":"https://github.com/QuantumGeordie/maze","homepage":"http://quantumgeordie.github.io/maze/","size":164,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"QuantumGeordie:master","ref":"master","sha":"d5a40963b1adf9f0dc65e18541c889ed537cff19","user":{"login":"QuantumGeordie","id":667992,"avatar_url":"https://avatars.githubusercontent.com/u/667992?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumGeordie","html_url":"https://github.com/QuantumGeordie","followers_url":"https://api.github.com/users/QuantumGeordie/followers","following_url":"https://api.github.com/users/QuantumGeordie/following{/other_user}","gists_url":"https://api.github.com/users/QuantumGeordie/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumGeordie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumGeordie/subscriptions","organizations_url":"https://api.github.com/users/QuantumGeordie/orgs","repos_url":"https://api.github.com/users/QuantumGeordie/repos","events_url":"https://api.github.com/users/QuantumGeordie/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumGeordie/received_events","type":"User","site_admin":false},"repo":{"id":29457727,"name":"maze","full_name":"QuantumGeordie/maze","owner":{"login":"QuantumGeordie","id":667992,"avatar_url":"https://avatars.githubusercontent.com/u/667992?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumGeordie","html_url":"https://github.com/QuantumGeordie","followers_url":"https://api.github.com/users/QuantumGeordie/followers","following_url":"https://api.github.com/users/QuantumGeordie/following{/other_user}","gists_url":"https://api.github.com/users/QuantumGeordie/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumGeordie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumGeordie/subscriptions","organizations_url":"https://api.github.com/users/QuantumGeordie/orgs","repos_url":"https://api.github.com/users/QuantumGeordie/repos","events_url":"https://api.github.com/users/QuantumGeordie/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumGeordie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/QuantumGeordie/maze","description":"javascript maze generator and solver","fork":false,"url":"https://api.github.com/repos/QuantumGeordie/maze","forks_url":"https://api.github.com/repos/QuantumGeordie/maze/forks","keys_url":"https://api.github.com/repos/QuantumGeordie/maze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantumGeordie/maze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantumGeordie/maze/teams","hooks_url":"https://api.github.com/repos/QuantumGeordie/maze/hooks","issue_events_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/events{/number}","events_url":"https://api.github.com/repos/QuantumGeordie/maze/events","assignees_url":"https://api.github.com/repos/QuantumGeordie/maze/assignees{/user}","branches_url":"https://api.github.com/repos/QuantumGeordie/maze/branches{/branch}","tags_url":"https://api.github.com/repos/QuantumGeordie/maze/tags","blobs_url":"https://api.github.com/repos/QuantumGeordie/maze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantumGeordie/maze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantumGeordie/maze/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantumGeordie/maze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantumGeordie/maze/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantumGeordie/maze/languages","stargazers_url":"https://api.github.com/repos/QuantumGeordie/maze/stargazers","contributors_url":"https://api.github.com/repos/QuantumGeordie/maze/contributors","subscribers_url":"https://api.github.com/repos/QuantumGeordie/maze/subscribers","subscription_url":"https://api.github.com/repos/QuantumGeordie/maze/subscription","commits_url":"https://api.github.com/repos/QuantumGeordie/maze/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantumGeordie/maze/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantumGeordie/maze/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantumGeordie/maze/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantumGeordie/maze/contents/{+path}","compare_url":"https://api.github.com/repos/QuantumGeordie/maze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantumGeordie/maze/merges","archive_url":"https://api.github.com/repos/QuantumGeordie/maze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantumGeordie/maze/downloads","issues_url":"https://api.github.com/repos/QuantumGeordie/maze/issues{/number}","pulls_url":"https://api.github.com/repos/QuantumGeordie/maze/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantumGeordie/maze/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantumGeordie/maze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantumGeordie/maze/labels{/name}","releases_url":"https://api.github.com/repos/QuantumGeordie/maze/releases{/id}","created_at":"2015-01-19T06:48:55Z","updated_at":"2015-02-19T19:12:10Z","pushed_at":"2015-09-14T22:07:47Z","git_url":"git://github.com/QuantumGeordie/maze.git","ssh_url":"git@github.com:QuantumGeordie/maze.git","clone_url":"https://github.com/QuantumGeordie/maze.git","svn_url":"https://github.com/QuantumGeordie/maze","homepage":"http://quantumgeordie.github.io/maze/","size":164,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2"},"html":{"href":"https://github.com/QuantumGeordie/maze/pull/2"},"issue":{"href":"https://api.github.com/repos/QuantumGeordie/maze/issues/2"},"comments":{"href":"https://api.github.com/repos/QuantumGeordie/maze/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantumGeordie/maze/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/QuantumGeordie/maze/statuses/986579b72bd8b4f2331a7a32b3ba7cce6ddaaa03"}}}}