{"action":"created","comment":{"url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/comments/217284860","pull_request_review_id":154955165,"id":217284860,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzI4NDg2MA==","diff_hunk":"@@ -1,64 +1,17 @@\n package racingcar;\n \n+import java.util.ArrayList;\n import java.util.Random;\n import java.util.Scanner;\n \n public class Racing {\n-    private int time;\n-    private int[] carPositions;\n-\n-    private final int MAXNUMBER = 10;\n-    private final int STANDARD = 4;\n+    ArrayList<Car> cars = new ArrayList<>();\n \n     public void run(){\n-        inputData();\n-        moveCar();\n-\n-        System.out.println(\"\\n실행 결과\");\n-        for(int i = 0; i < carPositions.length; i++) {\n-            printMove(carPositions[i]);\n-        }\n-    };\n-\n-    public void inputData() {\n-        Scanner scanner = new Scanner(System.in);\n-\n-        System.out.println(\"자동차 대수는 몇 대 인가요?\");\n-        carPositions = new int[scanner.nextInt()];\n-\n-        System.out.println(\"시도할 횟수는 몇 회 인가요?\");\n-        time = scanner.nextInt();\n-    }\n-\n-    public void moveCar() {\n-        for (int i = 0; i < carPositions.length; i++) {\n-            carPositions[i] = moveCarSingle();\n-        }\n-    }\n-\n-    public int moveCarSingle() {\n-        int move = 0;\n-        for (int i = 0; i < time; i++) {\n-            move += moveCount();\n-        }\n-        return move;\n-    }\n-\n-    public int moveCount() {\n-        int move = 0;\n-        Random random = new Random();\n-        int randomNum = random.nextInt(MAXNUMBER);\n-\n-        if(randomNum >= STANDARD) {\n-            move++;\n-        }\n-        return move;\n-    }\n+        InputView iv = new InputView();\n+        ResultView rv = new ResultView();","path":"src/main/java/racingcar/Racing.java","position":60,"original_position":60,"commit_id":"3560ab3938f88913181467f528c0e30d50ab3b2f","original_commit_id":"3560ab3938f88913181467f528c0e30d50ab3b2f","user":{"login":"javajigi","id":520500,"node_id":"MDQ6VXNlcjUyMDUwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/520500?v=4","gravatar_id":"","url":"https://api.github.com/users/javajigi","html_url":"https://github.com/javajigi","followers_url":"https://api.github.com/users/javajigi/followers","following_url":"https://api.github.com/users/javajigi/following{/other_user}","gists_url":"https://api.github.com/users/javajigi/gists{/gist_id}","starred_url":"https://api.github.com/users/javajigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javajigi/subscriptions","organizations_url":"https://api.github.com/users/javajigi/orgs","repos_url":"https://api.github.com/users/javajigi/repos","events_url":"https://api.github.com/users/javajigi/events{/privacy}","received_events_url":"https://api.github.com/users/javajigi/received_events","type":"User","site_admin":false},"body":"인스턴스를 생성하지 말고 클래스 메소드로 구현해 본다.","created_at":"2018-09-13T07:29:22Z","updated_at":"2018-09-13T07:30:46Z","html_url":"https://github.com/code-squad/java-racingcar/pull/316#discussion_r217284860","pull_request_url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/comments/217284860"},"html":{"href":"https://github.com/code-squad/java-racingcar/pull/316#discussion_r217284860"},"pull_request":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316"}}},"pull_request":{"url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316","id":215185701,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MTg1NzAx","html_url":"https://github.com/code-squad/java-racingcar/pull/316","diff_url":"https://github.com/code-squad/java-racingcar/pull/316.diff","patch_url":"https://github.com/code-squad/java-racingcar/pull/316.patch","issue_url":"https://api.github.com/repos/code-squad/java-racingcar/issues/316","number":316,"state":"open","locked":false,"title":"Step3","user":{"login":"SeEunKim","id":22162950,"node_id":"MDQ6VXNlcjIyMTYyOTUw","avatar_url":"https://avatars3.githubusercontent.com/u/22162950?v=4","gravatar_id":"","url":"https://api.github.com/users/SeEunKim","html_url":"https://github.com/SeEunKim","followers_url":"https://api.github.com/users/SeEunKim/followers","following_url":"https://api.github.com/users/SeEunKim/following{/other_user}","gists_url":"https://api.github.com/users/SeEunKim/gists{/gist_id}","starred_url":"https://api.github.com/users/SeEunKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeEunKim/subscriptions","organizations_url":"https://api.github.com/users/SeEunKim/orgs","repos_url":"https://api.github.com/users/SeEunKim/repos","events_url":"https://api.github.com/users/SeEunKim/events{/privacy}","received_events_url":"https://api.github.com/users/SeEunKim/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-13T07:15:03Z","updated_at":"2018-09-13T07:30:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83d035f53449af8fc08c00bffcd30c01f9d22252","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316/commits","review_comments_url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316/comments","review_comment_url":"https://api.github.com/repos/code-squad/java-racingcar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-squad/java-racingcar/issues/316/comments","statuses_url":"https://api.github.com/repos/code-squad/java-racingcar/statuses/3560ab3938f88913181467f528c0e30d50ab3b2f","head":{"label":"SeEunKim:step3","ref":"step3","sha":"3560ab3938f88913181467f528c0e30d50ab3b2f","user":{"login":"SeEunKim","id":22162950,"node_id":"MDQ6VXNlcjIyMTYyOTUw","avatar_url":"https://avatars3.githubusercontent.com/u/22162950?v=4","gravatar_id":"","url":"https://api.github.com/users/SeEunKim","html_url":"https://github.com/SeEunKim","followers_url":"https://api.github.com/users/SeEunKim/followers","following_url":"https://api.github.com/users/SeEunKim/following{/other_user}","gists_url":"https://api.github.com/users/SeEunKim/gists{/gist_id}","starred_url":"https://api.github.com/users/SeEunKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeEunKim/subscriptions","organizations_url":"https://api.github.com/users/SeEunKim/orgs","repos_url":"https://api.github.com/users/SeEunKim/repos","events_url":"https://api.github.com/users/SeEunKim/events{/privacy}","received_events_url":"https://api.github.com/users/SeEunKim/received_events","type":"User","site_admin":false},"repo":{"id":148243746,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgyNDM3NDY=","name":"java-racingcar","full_name":"SeEunKim/java-racingcar","owner":{"login":"SeEunKim","id":22162950,"node_id":"MDQ6VXNlcjIyMTYyOTUw","avatar_url":"https://avatars3.githubusercontent.com/u/22162950?v=4","gravatar_id":"","url":"https://api.github.com/users/SeEunKim","html_url":"https://github.com/SeEunKim","followers_url":"https://api.github.com/users/SeEunKim/followers","following_url":"https://api.github.com/users/SeEunKim/following{/other_user}","gists_url":"https://api.github.com/users/SeEunKim/gists{/gist_id}","starred_url":"https://api.github.com/users/SeEunKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeEunKim/subscriptions","organizations_url":"https://api.github.com/users/SeEunKim/orgs","repos_url":"https://api.github.com/users/SeEunKim/repos","events_url":"https://api.github.com/users/SeEunKim/events{/privacy}","received_events_url":"https://api.github.com/users/SeEunKim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SeEunKim/java-racingcar","description":"자동차 경주용 게임을 관리하는 저장소","fork":true,"url":"https://api.github.com/repos/SeEunKim/java-racingcar","forks_url":"https://api.github.com/repos/SeEunKim/java-racingcar/forks","keys_url":"https://api.github.com/repos/SeEunKim/java-racingcar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SeEunKim/java-racingcar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SeEunKim/java-racingcar/teams","hooks_url":"https://api.github.com/repos/SeEunKim/java-racingcar/hooks","issue_events_url":"https://api.github.com/repos/SeEunKim/java-racingcar/issues/events{/number}","events_url":"https://api.github.com/repos/SeEunKim/java-racingcar/events","assignees_url":"https://api.github.com/repos/SeEunKim/java-racingcar/assignees{/user}","branches_url":"https://api.github.com/repos/SeEunKim/java-racingcar/branches{/branch}","tags_url":"https://api.github.com/repos/SeEunKim/java-racingcar/tags","blobs_url":"https://api.github.com/repos/SeEunKim/java-racingcar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SeEunKim/java-racingcar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SeEunKim/java-racingcar/git/refs{/sha}","trees_url":"https://api.github.com/repos/SeEunKim/java-racingcar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SeEunKim/java-racingcar/statuses/{sha}","languages_url":"https://api.github.com/repos/SeEunKim/java-racingcar/languages","stargazers_url":"https://api.github.com/repos/SeEunKim/java-racingcar/stargazers","contributors_url":"https://api.github.com/repos/SeEunKim/java-racingcar/contributors","subscribers_url":"https://api.github.com/repos/SeEunKim/java-racingcar/subscribers","subscription_url":"https://api.github.com/repos/SeEunKim/java-racingcar/subscription","commits_url":"https://api.github.com/repos/SeEunKim/java-racingcar/commits{/sha}","git_commits_url":"https://api.github.com/repos/SeEunKim/java-racingcar/git/commits{/sha}","comments_url":"https://api.github.com/repos/SeEunKim/java-racingcar/comments{/number}","issue_comment_url":"https://api.github.com/repos/SeEunKim/java-racingcar/issues/comments{/number}","contents_url":"https://api.github.com/repos/SeEunKim/java-racingcar/contents/{+path}","compare_url":"https://api.github.com/repos/SeEunKim/java-racingcar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SeEunKim/java-racingcar/merges","archive_url":"https://api.github.com/repos/SeEunKim/java-racingcar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SeEunKim/java-racingcar/downloads","issues_url":"https://api.github.com/repos/SeEunKim/java-racingcar/issues{/number}","pulls_url":"https://api.github.com/repos/SeEunKim/java-racingcar/pulls{/number}","milestones_url":"https://api.github.com/repos/SeEunKim/java-racingcar/milestones{/number}","notifications_url":"https://api.github.com/repos/SeEunKim/java-racingcar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SeEunKim/java-racingcar/labels{/name}","releases_url":"https://api.github.com/repos/SeEunKim/java-racingcar/releases{/id}","deployments_url":"https://api.github.com/repos/SeEunKim/java-racingcar/deployments","created_at":"2018-09-11T01:42:17Z","updated_at":"2018-09-11T01:42:19Z","pushed_at":"2018-09-13T07:11:23Z","git_url":"git://github.com/SeEunKim/java-racingcar.git","ssh_url":"git@github.com:SeEunKim/java-racingcar.git","clone_url":"https://github.com/SeEunKim/java-racingcar.git","svn_url":"https://github.com/SeEunKim/java-racingcar","homepage":null,"size":796,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"code-squad:SeEunKim","ref":"SeEunKim","sha":"6d602d4db6b1d61bc76a50b83dd60d30a1965b0a","user":{"login":"code-squad","id":22832280,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODMyMjgw","avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"repo":{"id":103878922,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM4Nzg5MjI=","name":"java-racingcar","full_name":"code-squad/java-racingcar","owner":{"login":"code-squad","id":22832280,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODMyMjgw","avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-squad/java-racingcar","description":"자동차 경주용 게임을 관리하는 저장소","fork":false,"url":"https://api.github.com/repos/code-squad/java-racingcar","forks_url":"https://api.github.com/repos/code-squad/java-racingcar/forks","keys_url":"https://api.github.com/repos/code-squad/java-racingcar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-squad/java-racingcar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-squad/java-racingcar/teams","hooks_url":"https://api.github.com/repos/code-squad/java-racingcar/hooks","issue_events_url":"https://api.github.com/repos/code-squad/java-racingcar/issues/events{/number}","events_url":"https://api.github.com/repos/code-squad/java-racingcar/events","assignees_url":"https://api.github.com/repos/code-squad/java-racingcar/assignees{/user}","branches_url":"https://api.github.com/repos/code-squad/java-racingcar/branches{/branch}","tags_url":"https://api.github.com/repos/code-squad/java-racingcar/tags","blobs_url":"https://api.github.com/repos/code-squad/java-racingcar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-squad/java-racingcar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-squad/java-racingcar/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-squad/java-racingcar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-squad/java-racingcar/statuses/{sha}","languages_url":"https://api.github.com/repos/code-squad/java-racingcar/languages","stargazers_url":"https://api.github.com/repos/code-squad/java-racingcar/stargazers","contributors_url":"https://api.github.com/repos/code-squad/java-racingcar/contributors","subscribers_url":"https://api.github.com/repos/code-squad/java-racingcar/subscribers","subscription_url":"https://api.github.com/repos/code-squad/java-racingcar/subscription","commits_url":"https://api.github.com/repos/code-squad/java-racingcar/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-squad/java-racingcar/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-squad/java-racingcar/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-squad/java-racingcar/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-squad/java-racingcar/contents/{+path}","compare_url":"https://api.github.com/repos/code-squad/java-racingcar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-squad/java-racingcar/merges","archive_url":"https://api.github.com/repos/code-squad/java-racingcar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-squad/java-racingcar/downloads","issues_url":"https://api.github.com/repos/code-squad/java-racingcar/issues{/number}","pulls_url":"https://api.github.com/repos/code-squad/java-racingcar/pulls{/number}","milestones_url":"https://api.github.com/repos/code-squad/java-racingcar/milestones{/number}","notifications_url":"https://api.github.com/repos/code-squad/java-racingcar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-squad/java-racingcar/labels{/name}","releases_url":"https://api.github.com/repos/code-squad/java-racingcar/releases{/id}","deployments_url":"https://api.github.com/repos/code-squad/java-racingcar/deployments","created_at":"2017-09-18T01:58:18Z","updated_at":"2018-07-08T08:32:00Z","pushed_at":"2018-09-13T07:15:04Z","git_url":"git://github.com/code-squad/java-racingcar.git","ssh_url":"git@github.com:code-squad/java-racingcar.git","clone_url":"https://github.com/code-squad/java-racingcar.git","svn_url":"https://github.com/code-squad/java-racingcar","homepage":null,"size":833,"stargazers_count":13,"watchers_count":13,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":79,"open_issues":3,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316"},"html":{"href":"https://github.com/code-squad/java-racingcar/pull/316"},"issue":{"href":"https://api.github.com/repos/code-squad/java-racingcar/issues/316"},"comments":{"href":"https://api.github.com/repos/code-squad/java-racingcar/issues/316/comments"},"review_comments":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316/comments"},"review_comment":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-squad/java-racingcar/pulls/316/commits"},"statuses":{"href":"https://api.github.com/repos/code-squad/java-racingcar/statuses/3560ab3938f88913181467f528c0e30d50ab3b2f"}},"author_association":"NONE"}}
{"actor":{"display_login":"javajigi"}}