[자동차 경주] 염휘건 미션 제출합니다.#460
Open
DreamPaste wants to merge 5 commits intowoowacourse-precourse:mainfrom
Open
Conversation
- name, position 변수 존재 - move(): 랜덤 숫자를 생성 후 4 이상일 경우 전진 - getPosition(): 현재 위치를 - 문자열로 반환
- start(): 게임 시작 및 전체 흐름 관리 - getCarNames(): 자동차 이름을 입력받음 - validateCarNames(): 자동차 이름 유효성 검증 - getCount(): 시도 횟수 입력받고 검증 - printCars(): 모든 자동차의 현재 위치 출력
- runRacing(): 레이스 시도 횟수 만큼실행 - moveCars(): 모든 자동차 이동 - printWinners(): 우승자 결정 및 출력
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
기능 구현
1-1. 자동차 이름 입력 및 검증
1-2. 시도횟수 입력 및 검증
2. Car 클래스 구현
자동차는 이름과 현재 위치를 가지고 있어야 함.
pickNumberInRange(0, 9)를 사용하여 랜덤 숫자를 생성, 4 이상일 경우 position 를 증가시킴
전진하는 자동차를 출력할 때 자동차 이름을 같이 출력
3. 레이싱 진행
4. 우승자 선별