{"action":"created","comment":{"url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/comments/87272474","pull_request_review_id":7891625,"id":87272474,"diff_hunk":"@@ -0,0 +1,22 @@\n+package io.aigar.game\n+\n+import com.github.jpbetz.subspace.Vector2\n+\n+\n+trait EntityContainer {\n+  def respawn(grid: Grid, players: List[Player], respawnRetryAttempts: Int): Option[Vector2] = {\n+    var newPosition = grid.randomPosition\n+\n+    1 to respawnRetryAttempts foreach { _ =>\n+      for (player <- players) {\n+        for (cell <- player.cells) {\n+          if (cell.contains(newPosition))\n+            newPosition = grid.randomPosition\n+          else\n+            return Some(newPosition)","path":"game/src/main/scala/io/aigar/game/EntityContainer.scala","position":16,"original_position":16,"commit_id":"3369ef0540d2073bbdbe897e927e481ace422d41","original_commit_id":"3369ef0540d2073bbdbe897e927e481ace422d41","user":{"login":"JesseEmond","id":1843555,"avatar_url":"https://avatars.githubusercontent.com/u/1843555?v=3","gravatar_id":"","url":"https://api.github.com/users/JesseEmond","html_url":"https://github.com/JesseEmond","followers_url":"https://api.github.com/users/JesseEmond/followers","following_url":"https://api.github.com/users/JesseEmond/following{/other_user}","gists_url":"https://api.github.com/users/JesseEmond/gists{/gist_id}","starred_url":"https://api.github.com/users/JesseEmond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JesseEmond/subscriptions","organizations_url":"https://api.github.com/users/JesseEmond/orgs","repos_url":"https://api.github.com/users/JesseEmond/repos","events_url":"https://api.github.com/users/JesseEmond/events{/privacy}","received_events_url":"https://api.github.com/users/JesseEmond/received_events","type":"User","site_admin":false},"body":"I think this should be at the end of the method, or else it will always only try once.","created_at":"2016-11-09T20:37:23Z","updated_at":"2016-11-09T20:37:23Z","html_url":"https://github.com/DrPandemic/aigar.io/pull/290#discussion_r87272474","pull_request_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/comments/87272474"},"html":{"href":"https://github.com/DrPandemic/aigar.io/pull/290#discussion_r87272474"},"pull_request":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290","id":93003420,"html_url":"https://github.com/DrPandemic/aigar.io/pull/290","diff_url":"https://github.com/DrPandemic/aigar.io/pull/290.diff","patch_url":"https://github.com/DrPandemic/aigar.io/pull/290.patch","issue_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/290","number":290,"state":"open","locked":false,"title":"Refactors Viruses","user":{"login":"MicLamb","id":6540007,"avatar_url":"https://avatars.githubusercontent.com/u/6540007?v=3","gravatar_id":"","url":"https://api.github.com/users/MicLamb","html_url":"https://github.com/MicLamb","followers_url":"https://api.github.com/users/MicLamb/followers","following_url":"https://api.github.com/users/MicLamb/following{/other_user}","gists_url":"https://api.github.com/users/MicLamb/gists{/gist_id}","starred_url":"https://api.github.com/users/MicLamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicLamb/subscriptions","organizations_url":"https://api.github.com/users/MicLamb/orgs","repos_url":"https://api.github.com/users/MicLamb/repos","events_url":"https://api.github.com/users/MicLamb/events{/privacy}","received_events_url":"https://api.github.com/users/MicLamb/received_events","type":"User","site_admin":false},"body":"Adds `Entity` and `EntityContainer` classes.\r\nAdapts `Virus` with the class `Viruses` that acts as the container.\r\nFixes the tests.\r\n\r\nRelated to #274.\r\nI'll do it in at least 3 PRs.","created_at":"2016-11-09T17:18:38Z","updated_at":"2016-11-09T20:43:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcd7b85ab64e7d046314de90dc3ca90fe44cb423","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290/commits","review_comments_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290/comments","review_comment_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/290/comments","statuses_url":"https://api.github.com/repos/DrPandemic/aigar.io/statuses/3369ef0540d2073bbdbe897e927e481ace422d41","head":{"label":"DrPandemic:refactor-virus","ref":"refactor-virus","sha":"3369ef0540d2073bbdbe897e927e481ace422d41","user":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"repo":{"id":68840511,"name":"aigar.io","full_name":"DrPandemic/aigar.io","owner":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DrPandemic/aigar.io","description":null,"fork":false,"url":"https://api.github.com/repos/DrPandemic/aigar.io","forks_url":"https://api.github.com/repos/DrPandemic/aigar.io/forks","keys_url":"https://api.github.com/repos/DrPandemic/aigar.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DrPandemic/aigar.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DrPandemic/aigar.io/teams","hooks_url":"https://api.github.com/repos/DrPandemic/aigar.io/hooks","issue_events_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/events{/number}","events_url":"https://api.github.com/repos/DrPandemic/aigar.io/events","assignees_url":"https://api.github.com/repos/DrPandemic/aigar.io/assignees{/user}","branches_url":"https://api.github.com/repos/DrPandemic/aigar.io/branches{/branch}","tags_url":"https://api.github.com/repos/DrPandemic/aigar.io/tags","blobs_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DrPandemic/aigar.io/statuses/{sha}","languages_url":"https://api.github.com/repos/DrPandemic/aigar.io/languages","stargazers_url":"https://api.github.com/repos/DrPandemic/aigar.io/stargazers","contributors_url":"https://api.github.com/repos/DrPandemic/aigar.io/contributors","subscribers_url":"https://api.github.com/repos/DrPandemic/aigar.io/subscribers","subscription_url":"https://api.github.com/repos/DrPandemic/aigar.io/subscription","commits_url":"https://api.github.com/repos/DrPandemic/aigar.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/DrPandemic/aigar.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/DrPandemic/aigar.io/contents/{+path}","compare_url":"https://api.github.com/repos/DrPandemic/aigar.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DrPandemic/aigar.io/merges","archive_url":"https://api.github.com/repos/DrPandemic/aigar.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DrPandemic/aigar.io/downloads","issues_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues{/number}","pulls_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls{/number}","milestones_url":"https://api.github.com/repos/DrPandemic/aigar.io/milestones{/number}","notifications_url":"https://api.github.com/repos/DrPandemic/aigar.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DrPandemic/aigar.io/labels{/name}","releases_url":"https://api.github.com/repos/DrPandemic/aigar.io/releases{/id}","deployments_url":"https://api.github.com/repos/DrPandemic/aigar.io/deployments","created_at":"2016-09-21T17:18:41Z","updated_at":"2016-11-01T23:23:51Z","pushed_at":"2016-11-09T18:45:02Z","git_url":"git://github.com/DrPandemic/aigar.io.git","ssh_url":"git@github.com:DrPandemic/aigar.io.git","clone_url":"https://github.com/DrPandemic/aigar.io.git","svn_url":"https://github.com/DrPandemic/aigar.io","homepage":null,"size":3139,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":46,"forks":0,"open_issues":46,"watchers":3,"default_branch":"master"}},"base":{"label":"DrPandemic:master","ref":"master","sha":"53333f6e4287fbaf3d689e3e95ce856861975994","user":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"repo":{"id":68840511,"name":"aigar.io","full_name":"DrPandemic/aigar.io","owner":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DrPandemic/aigar.io","description":null,"fork":false,"url":"https://api.github.com/repos/DrPandemic/aigar.io","forks_url":"https://api.github.com/repos/DrPandemic/aigar.io/forks","keys_url":"https://api.github.com/repos/DrPandemic/aigar.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DrPandemic/aigar.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DrPandemic/aigar.io/teams","hooks_url":"https://api.github.com/repos/DrPandemic/aigar.io/hooks","issue_events_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/events{/number}","events_url":"https://api.github.com/repos/DrPandemic/aigar.io/events","assignees_url":"https://api.github.com/repos/DrPandemic/aigar.io/assignees{/user}","branches_url":"https://api.github.com/repos/DrPandemic/aigar.io/branches{/branch}","tags_url":"https://api.github.com/repos/DrPandemic/aigar.io/tags","blobs_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DrPandemic/aigar.io/statuses/{sha}","languages_url":"https://api.github.com/repos/DrPandemic/aigar.io/languages","stargazers_url":"https://api.github.com/repos/DrPandemic/aigar.io/stargazers","contributors_url":"https://api.github.com/repos/DrPandemic/aigar.io/contributors","subscribers_url":"https://api.github.com/repos/DrPandemic/aigar.io/subscribers","subscription_url":"https://api.github.com/repos/DrPandemic/aigar.io/subscription","commits_url":"https://api.github.com/repos/DrPandemic/aigar.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/DrPandemic/aigar.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/DrPandemic/aigar.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/DrPandemic/aigar.io/contents/{+path}","compare_url":"https://api.github.com/repos/DrPandemic/aigar.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DrPandemic/aigar.io/merges","archive_url":"https://api.github.com/repos/DrPandemic/aigar.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DrPandemic/aigar.io/downloads","issues_url":"https://api.github.com/repos/DrPandemic/aigar.io/issues{/number}","pulls_url":"https://api.github.com/repos/DrPandemic/aigar.io/pulls{/number}","milestones_url":"https://api.github.com/repos/DrPandemic/aigar.io/milestones{/number}","notifications_url":"https://api.github.com/repos/DrPandemic/aigar.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DrPandemic/aigar.io/labels{/name}","releases_url":"https://api.github.com/repos/DrPandemic/aigar.io/releases{/id}","deployments_url":"https://api.github.com/repos/DrPandemic/aigar.io/deployments","created_at":"2016-09-21T17:18:41Z","updated_at":"2016-11-01T23:23:51Z","pushed_at":"2016-11-09T18:45:02Z","git_url":"git://github.com/DrPandemic/aigar.io.git","ssh_url":"git@github.com:DrPandemic/aigar.io.git","clone_url":"https://github.com/DrPandemic/aigar.io.git","svn_url":"https://github.com/DrPandemic/aigar.io","homepage":null,"size":3139,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":46,"forks":0,"open_issues":46,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290"},"html":{"href":"https://github.com/DrPandemic/aigar.io/pull/290"},"issue":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/issues/290"},"comments":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/DrPandemic/aigar.io/statuses/3369ef0540d2073bbdbe897e927e481ace422d41"}}}}
{"actor":{"display_login":"JesseEmond"}}