{"action":"opened","number":125,"pull_request":{"url":"https://api.github.com/repos/vcmi/vcmi/pulls/125","id":48656165,"html_url":"https://github.com/vcmi/vcmi/pull/125","diff_url":"https://github.com/vcmi/vcmi/pull/125.diff","patch_url":"https://github.com/vcmi/vcmi/pull/125.patch","issue_url":"https://api.github.com/repos/vcmi/vcmi/issues/125","number":125,"state":"open","locked":false,"title":"Pathfinding code refactoring","user":{"login":"ArseniyShestakov","id":9513350,"avatar_url":"https://avatars.githubusercontent.com/u/9513350?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyShestakov","html_url":"https://github.com/ArseniyShestakov","followers_url":"https://api.github.com/users/ArseniyShestakov/followers","following_url":"https://api.github.com/users/ArseniyShestakov/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyShestakov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyShestakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyShestakov/subscriptions","organizations_url":"https://api.github.com/users/ArseniyShestakov/orgs","repos_url":"https://api.github.com/users/ArseniyShestakov/repos","events_url":"https://api.github.com/users/ArseniyShestakov/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyShestakov/received_events","type":"User","site_admin":false},"body":"This one not fully ready, but I can already collect more feedback as well as get your thoughts on following ideas:\r\n1. What about move CPathfinder and everything related into separate file?\r\n2. What other code must belong to pathfinder?\r\nThere also several functions that may be better placed within pathfinder related code:\r\n   * CGameState::getMovementCost is first candidate and it's probably need own class like CMovementCost. Reason for this is fact that it's may be used by external code with current hero state, but in pathfinding it's must calculate cost based on current pathfinding state. E.g boat.\r\n   * getNeighbours / canMoveBetween / checkForVisitableDir / etc.\r\n\r\nIt's just ideas and I don't sure what exactly must be moved into pathfinder, but moving code out CGameState would make future development easier.\r\n\r\nOnce this code is merged I'm going to work on something bigger:\r\nhttp://forum.vcmi.eu/viewtopic.php?t=1115\r\nThen I can finally get rid of \"useEmbarkCost\" and move all cost calculations into separate function. For this branch it's not viable because flying / water walking require huge changes in same area anyway.","created_at":"2015-10-24T13:37:10Z","updated_at":"2015-10-24T13:37:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vcmi/vcmi/pulls/125/commits","review_comments_url":"https://api.github.com/repos/vcmi/vcmi/pulls/125/comments","review_comment_url":"https://api.github.com/repos/vcmi/vcmi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vcmi/vcmi/issues/125/comments","statuses_url":"https://api.github.com/repos/vcmi/vcmi/statuses/4f7c3ec60f5f7b257c271b3543e2b6da9b08800b","head":{"label":"ArseniyShestakov:newMovementSystem","ref":"newMovementSystem","sha":"4f7c3ec60f5f7b257c271b3543e2b6da9b08800b","user":{"login":"ArseniyShestakov","id":9513350,"avatar_url":"https://avatars.githubusercontent.com/u/9513350?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyShestakov","html_url":"https://github.com/ArseniyShestakov","followers_url":"https://api.github.com/users/ArseniyShestakov/followers","following_url":"https://api.github.com/users/ArseniyShestakov/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyShestakov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyShestakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyShestakov/subscriptions","organizations_url":"https://api.github.com/users/ArseniyShestakov/orgs","repos_url":"https://api.github.com/users/ArseniyShestakov/repos","events_url":"https://api.github.com/users/ArseniyShestakov/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyShestakov/received_events","type":"User","site_admin":false},"repo":{"id":27022927,"name":"vcmi","full_name":"ArseniyShestakov/vcmi","owner":{"login":"ArseniyShestakov","id":9513350,"avatar_url":"https://avatars.githubusercontent.com/u/9513350?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyShestakov","html_url":"https://github.com/ArseniyShestakov","followers_url":"https://api.github.com/users/ArseniyShestakov/followers","following_url":"https://api.github.com/users/ArseniyShestakov/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyShestakov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyShestakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyShestakov/subscriptions","organizations_url":"https://api.github.com/users/ArseniyShestakov/orgs","repos_url":"https://api.github.com/users/ArseniyShestakov/repos","events_url":"https://api.github.com/users/ArseniyShestakov/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyShestakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArseniyShestakov/vcmi","description":"Open-source engine for Heroes of Might and Magic III","fork":true,"url":"https://api.github.com/repos/ArseniyShestakov/vcmi","forks_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/forks","keys_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/teams","hooks_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/hooks","issue_events_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/issues/events{/number}","events_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/events","assignees_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/assignees{/user}","branches_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/branches{/branch}","tags_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/tags","blobs_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/statuses/{sha}","languages_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/languages","stargazers_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/stargazers","contributors_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/contributors","subscribers_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/subscribers","subscription_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/subscription","commits_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/contents/{+path}","compare_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/merges","archive_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/downloads","issues_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/issues{/number}","pulls_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/pulls{/number}","milestones_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/milestones{/number}","notifications_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/labels{/name}","releases_url":"https://api.github.com/repos/ArseniyShestakov/vcmi/releases{/id}","created_at":"2014-11-23T05:23:00Z","updated_at":"2015-03-10T17:12:29Z","pushed_at":"2015-10-24T13:01:38Z","git_url":"git://github.com/ArseniyShestakov/vcmi.git","ssh_url":"git@github.com:ArseniyShestakov/vcmi.git","clone_url":"https://github.com/ArseniyShestakov/vcmi.git","svn_url":"https://github.com/ArseniyShestakov/vcmi","homepage":"http://vcmi.eu/","size":28996,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"vcmi:develop","ref":"develop","sha":"86e1ae928e5be11e98c7ddf671f46614fbdffa72","user":{"login":"vcmi","id":2861395,"avatar_url":"https://avatars.githubusercontent.com/u/2861395?v=3","gravatar_id":"","url":"https://api.github.com/users/vcmi","html_url":"https://github.com/vcmi","followers_url":"https://api.github.com/users/vcmi/followers","following_url":"https://api.github.com/users/vcmi/following{/other_user}","gists_url":"https://api.github.com/users/vcmi/gists{/gist_id}","starred_url":"https://api.github.com/users/vcmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcmi/subscriptions","organizations_url":"https://api.github.com/users/vcmi/orgs","repos_url":"https://api.github.com/users/vcmi/repos","events_url":"https://api.github.com/users/vcmi/events{/privacy}","received_events_url":"https://api.github.com/users/vcmi/received_events","type":"Organization","site_admin":false},"repo":{"id":18490421,"name":"vcmi","full_name":"vcmi/vcmi","owner":{"login":"vcmi","id":2861395,"avatar_url":"https://avatars.githubusercontent.com/u/2861395?v=3","gravatar_id":"","url":"https://api.github.com/users/vcmi","html_url":"https://github.com/vcmi","followers_url":"https://api.github.com/users/vcmi/followers","following_url":"https://api.github.com/users/vcmi/following{/other_user}","gists_url":"https://api.github.com/users/vcmi/gists{/gist_id}","starred_url":"https://api.github.com/users/vcmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcmi/subscriptions","organizations_url":"https://api.github.com/users/vcmi/orgs","repos_url":"https://api.github.com/users/vcmi/repos","events_url":"https://api.github.com/users/vcmi/events{/privacy}","received_events_url":"https://api.github.com/users/vcmi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vcmi/vcmi","description":"Open-source engine for Heroes of Might and Magic III","fork":false,"url":"https://api.github.com/repos/vcmi/vcmi","forks_url":"https://api.github.com/repos/vcmi/vcmi/forks","keys_url":"https://api.github.com/repos/vcmi/vcmi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vcmi/vcmi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vcmi/vcmi/teams","hooks_url":"https://api.github.com/repos/vcmi/vcmi/hooks","issue_events_url":"https://api.github.com/repos/vcmi/vcmi/issues/events{/number}","events_url":"https://api.github.com/repos/vcmi/vcmi/events","assignees_url":"https://api.github.com/repos/vcmi/vcmi/assignees{/user}","branches_url":"https://api.github.com/repos/vcmi/vcmi/branches{/branch}","tags_url":"https://api.github.com/repos/vcmi/vcmi/tags","blobs_url":"https://api.github.com/repos/vcmi/vcmi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vcmi/vcmi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vcmi/vcmi/git/refs{/sha}","trees_url":"https://api.github.com/repos/vcmi/vcmi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vcmi/vcmi/statuses/{sha}","languages_url":"https://api.github.com/repos/vcmi/vcmi/languages","stargazers_url":"https://api.github.com/repos/vcmi/vcmi/stargazers","contributors_url":"https://api.github.com/repos/vcmi/vcmi/contributors","subscribers_url":"https://api.github.com/repos/vcmi/vcmi/subscribers","subscription_url":"https://api.github.com/repos/vcmi/vcmi/subscription","commits_url":"https://api.github.com/repos/vcmi/vcmi/commits{/sha}","git_commits_url":"https://api.github.com/repos/vcmi/vcmi/git/commits{/sha}","comments_url":"https://api.github.com/repos/vcmi/vcmi/comments{/number}","issue_comment_url":"https://api.github.com/repos/vcmi/vcmi/issues/comments{/number}","contents_url":"https://api.github.com/repos/vcmi/vcmi/contents/{+path}","compare_url":"https://api.github.com/repos/vcmi/vcmi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vcmi/vcmi/merges","archive_url":"https://api.github.com/repos/vcmi/vcmi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vcmi/vcmi/downloads","issues_url":"https://api.github.com/repos/vcmi/vcmi/issues{/number}","pulls_url":"https://api.github.com/repos/vcmi/vcmi/pulls{/number}","milestones_url":"https://api.github.com/repos/vcmi/vcmi/milestones{/number}","notifications_url":"https://api.github.com/repos/vcmi/vcmi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vcmi/vcmi/labels{/name}","releases_url":"https://api.github.com/repos/vcmi/vcmi/releases{/id}","created_at":"2014-04-06T13:42:23Z","updated_at":"2015-10-23T22:45:26Z","pushed_at":"2015-10-24T13:37:10Z","git_url":"git://github.com/vcmi/vcmi.git","ssh_url":"git@github.com:vcmi/vcmi.git","clone_url":"https://github.com/vcmi/vcmi.git","svn_url":"https://github.com/vcmi/vcmi","homepage":"http://vcmi.eu/","size":32237,"stargazers_count":319,"watchers_count":319,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":4,"forks":70,"open_issues":4,"watchers":319,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/vcmi/vcmi/pulls/125"},"html":{"href":"https://github.com/vcmi/vcmi/pull/125"},"issue":{"href":"https://api.github.com/repos/vcmi/vcmi/issues/125"},"comments":{"href":"https://api.github.com/repos/vcmi/vcmi/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/vcmi/vcmi/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/vcmi/vcmi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vcmi/vcmi/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/vcmi/vcmi/statuses/4f7c3ec60f5f7b257c271b3543e2b6da9b08800b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":18,"additions":261,"deletions":163,"changed_files":9}}