{"action":"created","comment":{"url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/comments/47083982","id":47083982,"diff_hunk":"@@ -1,21 +1,49 @@\n import org.junit.Test;\n \n-import java.util.Arrays;\n+import java.util.Random;\n \n-import static org.hamcrest.Matchers.isIn;\n+import static org.hamcrest.core.Is.is;\n import static org.junit.Assert.assertEquals;\n import static org.junit.Assert.assertThat;\n \n public class AIPlayerTest {\n     @Test\n-    public void generateThrow() {\n-        AIPlayer aiPlayer = new AIPlayer();\n+    public void generateScissorsThrow() {\n+        AIPlayer aiPlayer = new AIPlayer(new RandomFake(0.99));\n         Throw move = aiPlayer.generateThrow();\n         assertEquals(true, isValidThrowType(move));\n-        assertThat(aiPlayer.getThrow(), isIn(Arrays.asList(Throw.ROCK, Throw.PAPER, Throw.SCISSORS)));\n+        assertThat(aiPlayer.getThrow(), is(Throw.SCISSORS));\n+    }\n+\n+    @Test\n+    public void generateRockThrow() {\n+        AIPlayer aiPlayer = new AIPlayer(new RandomFake(0.1));\n+        Throw move = aiPlayer.generateThrow();\n+        assertEquals(true, isValidThrowType(move));\n+        assertThat(aiPlayer.getThrow(), is(Throw.ROCK));\n+    }\n+\n+    @Test\n+    public void generatePaperThrow() {\n+        AIPlayer aiPlayer = new AIPlayer(new RandomFake(0.5));\n+        Throw move = aiPlayer.generateThrow();\n+        assertEquals(true, isValidThrowType(move));\n+        assertThat(aiPlayer.getThrow(), is(Throw.PAPER));\n     }\n \n     private boolean isValidThrowType(Throw aThrow) {\n         return aThrow.equals(Throw.PAPER) || aThrow.equals(Throw.ROCK) || aThrow.equals(Throw.SCISSORS);\n     }\n+\n+    private class RandomFake extends Random {\n+        private final double randomValue;\n+\n+        public RandomFake(double randomFake) {","path":"test/AIPlayerTest.java","position":46,"original_position":46,"commit_id":"582d89deaecc45f7a17e5812a46872a8103a405f","original_commit_id":"582d89deaecc45f7a17e5812a46872a8103a405f","user":{"login":"jsuchy","id":6295,"avatar_url":"https://avatars.githubusercontent.com/u/6295?v=3","gravatar_id":"","url":"https://api.github.com/users/jsuchy","html_url":"https://github.com/jsuchy","followers_url":"https://api.github.com/users/jsuchy/followers","following_url":"https://api.github.com/users/jsuchy/following{/other_user}","gists_url":"https://api.github.com/users/jsuchy/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchy/subscriptions","organizations_url":"https://api.github.com/users/jsuchy/orgs","repos_url":"https://api.github.com/users/jsuchy/repos","events_url":"https://api.github.com/users/jsuchy/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchy/received_events","type":"User","site_admin":false},"body":"I'd prefer renaming randomFake to randomValue","created_at":"2015-12-09T12:28:35Z","updated_at":"2015-12-09T12:28:35Z","html_url":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13#discussion_r47083982","pull_request_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/comments/47083982"},"html":{"href":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13#discussion_r47083982"},"pull_request":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13","id":53111257,"html_url":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13","diff_url":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13.diff","patch_url":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13.patch","issue_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/13","number":13,"state":"open","locked":false,"title":"Make Constants final and static","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"body":"@maikon\r\n@jsuchy","created_at":"2015-12-09T12:15:32Z","updated_at":"2015-12-09T12:28:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e2d87d05bc285f2a909e6960419dbc46dbfa862","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13/commits","review_comments_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13/comments","review_comment_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/13/comments","statuses_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/statuses/582d89deaecc45f7a17e5812a46872a8103a405f","head":{"label":"sarahabimay:constants_final_static","ref":"constants_final_static","sha":"582d89deaecc45f7a17e5812a46872a8103a405f","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"repo":{"id":46419725,"name":"RockPaperScissors_Java","full_name":"sarahabimay/RockPaperScissors_Java","owner":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sarahabimay/RockPaperScissors_Java","description":"","fork":false,"url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java","forks_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/forks","keys_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/teams","hooks_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/hooks","issue_events_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/events{/number}","events_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/events","assignees_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/assignees{/user}","branches_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/branches{/branch}","tags_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/tags","blobs_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/statuses/{sha}","languages_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/languages","stargazers_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/stargazers","contributors_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/contributors","subscribers_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/subscribers","subscription_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/subscription","commits_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/contents/{+path}","compare_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/merges","archive_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/downloads","issues_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues{/number}","pulls_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls{/number}","milestones_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/milestones{/number}","notifications_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/labels{/name}","releases_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/releases{/id}","created_at":"2015-11-18T13:15:05Z","updated_at":"2015-11-19T16:14:55Z","pushed_at":"2015-12-09T12:15:33Z","git_url":"git://github.com/sarahabimay/RockPaperScissors_Java.git","ssh_url":"git@github.com:sarahabimay/RockPaperScissors_Java.git","clone_url":"https://github.com/sarahabimay/RockPaperScissors_Java.git","svn_url":"https://github.com/sarahabimay/RockPaperScissors_Java","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"sarahabimay:master","ref":"master","sha":"ceda313e5780965ac6348ce8fcf1b2eda6a9f7c2","user":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"repo":{"id":46419725,"name":"RockPaperScissors_Java","full_name":"sarahabimay/RockPaperScissors_Java","owner":{"login":"sarahabimay","id":10097084,"avatar_url":"https://avatars.githubusercontent.com/u/10097084?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahabimay","html_url":"https://github.com/sarahabimay","followers_url":"https://api.github.com/users/sarahabimay/followers","following_url":"https://api.github.com/users/sarahabimay/following{/other_user}","gists_url":"https://api.github.com/users/sarahabimay/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahabimay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahabimay/subscriptions","organizations_url":"https://api.github.com/users/sarahabimay/orgs","repos_url":"https://api.github.com/users/sarahabimay/repos","events_url":"https://api.github.com/users/sarahabimay/events{/privacy}","received_events_url":"https://api.github.com/users/sarahabimay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sarahabimay/RockPaperScissors_Java","description":"","fork":false,"url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java","forks_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/forks","keys_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/teams","hooks_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/hooks","issue_events_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/events{/number}","events_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/events","assignees_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/assignees{/user}","branches_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/branches{/branch}","tags_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/tags","blobs_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/statuses/{sha}","languages_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/languages","stargazers_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/stargazers","contributors_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/contributors","subscribers_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/subscribers","subscription_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/subscription","commits_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/contents/{+path}","compare_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/merges","archive_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/downloads","issues_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues{/number}","pulls_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls{/number}","milestones_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/milestones{/number}","notifications_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/labels{/name}","releases_url":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/releases{/id}","created_at":"2015-11-18T13:15:05Z","updated_at":"2015-11-19T16:14:55Z","pushed_at":"2015-12-09T12:15:33Z","git_url":"git://github.com/sarahabimay/RockPaperScissors_Java.git","ssh_url":"git@github.com:sarahabimay/RockPaperScissors_Java.git","clone_url":"https://github.com/sarahabimay/RockPaperScissors_Java.git","svn_url":"https://github.com/sarahabimay/RockPaperScissors_Java","homepage":null,"size":63,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13"},"html":{"href":"https://github.com/sarahabimay/RockPaperScissors_Java/pull/13"},"issue":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/13"},"comments":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/sarahabimay/RockPaperScissors_Java/statuses/582d89deaecc45f7a17e5812a46872a8103a405f"}}}}