Open
Conversation
deokisys
commented
Oct 28, 2024
- 입력 폼을 구현
- 쉽표를 기준으로 구분하여 자동차 입력받기
- 해쉬맵으로 구현한다.
- 시도할 횟수를 입력
- 쉽표를 기준으로 구분하여 자동차 입력받기
- 경주게임 구현
- 0-9의 무작위 숫자 얻기
- 진행상황 출력
- 입력된 자동차 순서대로 출력
- 우승자 출력
- 공동우승자는 입력 순서대로 출력
- ,로 구분
- 만약 우승자가 없다면, 우승자가 없다고 출력
- 공동우승자는 입력 순서대로 출력
- 예외, 오류
- 자동차 이름
- 6글자이상이거나 빈글자는 오류
- 대소문자를 구분한다.
- 중복된 이름은 오류 처리
- 영어로된 이름이어야 한다.
- 시도횟수
- 1이상의 숫자만 가능
- 0또는 빈숫자, 숫자 이외의 입력은 오류처리
- 자동차 이름
입력, 출력, 예외 3가지로 큰 가지로 구분하여 구현목록 작성
자동차이름 입력(,로 구분) 구현 각 자동차마다 이동거리0으로 초기화 시도할 횟수 입력 구현
레이싱게임을 진행한다. - 랜덤한 숫자를 통해 MOVING_FORWARD(4)를 넘으면 1씩 이동거리를 늘려준다. - 이동거리만큼'-'로 표시해서 출력한다. 결과를 출력한다. - 최대 이동거리만큼 이동한 자동차 이름들을 출력한다. - 우승자가 없으면 없다고 출력한다.
1~5글자의 영문으로 이루어진 자동차이름 허용 이름 중복은 불가
자동차이름 - 1~5글자 사이 영문만 허용 - 빈글자 불가, 중복 불가 이동횟수 - 숫자만허용 - 0불가, 숫자이외 불가
숫자만 입력가능 0은 입력 불가능
공동우승자일경우 테스트 우승자가 없을경우 테스트
대소문자를 구분해서 중복된 이름입력시 예외 테스트 추가
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.