-
Notifications
You must be signed in to change notification settings - Fork 177
[kakao] rui 사전과제 제출합니다. #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jungseokyoung-cloud
wants to merge
22
commits into
next-step:main
Choose a base branch
from
jungseokyoung-cloud:rui.bao
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
1~9 사이의 서로 다른 임의의 숫자 3개를 생성하여 BaseballNumbers를 반환하는 로직 추가
- 두 숫자 리스트를 비교하여 스트라이크와 볼 개수를 계산하는 기능 추가 - 판정 결과를 관리하고 상태를 확인(isThreeStrike, isNothing)하는 GameResult 클래스 추가
test 패키지에 소스 코드가 추가됨에 따라 더 이상 필요 없는 .gitkeep 파일 제거
- 외부에서 숫자를 확인할 수 있도록 getNumbers() 메서드 추가 - Collections.unmodifiableList를 적용하여 반환된 리스트의 수정을 방지(불변성 유지)
- 스트라이크, 볼, 낫싱 시나리오별 단위 테스트 작성 - GameResult 클래스의 상태 확인 메서드(isThreeStrike, isNothing) 검증
- 3스트라이크 판정 및 낫싱(Nothing) 판정 로직 검증 - 다양한 결과값에 대한 경계값 테스트 수행
- 게임 숫자 입력 검증(숫자 여부, 3자리, 중복 체크) 추가 - 재시작/종료 명령어(1 또는 2) 검증 추가 - 예외 발생 시 [ERROR] 프리픽스를 포함한 에러 throw
- 잘못된 형식(문자, 0 포함, 길이 미달/초과, 중복) 입력 시 예외 발생 검증 - 재시작/종료 명령어(1, 2) 외 입력 시 예외 발생 검증 - AssertJ의 assertThatThrownBy를 활용한 에러 메시지 일치 여부 확인
- run() 메서드를 통한 전체 게임 흐름 제어 추가 - 사용자의 재시작(1) 및 종료(2) 선택 기능 구현 - 잘못된 입력 시 에러 메시지 출력 후 재입력을 받는 예외 처리 로직 추가
- 판정 결과(스트라이크, 볼, 낫싱) 포맷팅 및 출력 기능 추가 - 게임 종료 메시지 및 에러 메시지 출력 메서드 구현 - StringBuilder를 사용하여 볼과 스트라이크 개수에 따른 유연한 문자열 생성
- 컴퓨터 난수 생성 및 사용자 입력 반복 루프 구현 - 입력값 유효성 검사 및 예외 발생 시 재입력 유도 로직 추가 - 스트라이크/볼 판정 결과 출력 및 3스트라이크 달성 시 게임 종료 처리
- main 메서드에서 InputView, OutputView, GameController 인스턴스 생성 - 컨트롤러에 뷰 의존성 주입 및 run() 호출을 통한 프로그램 실행 로직 완성
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.
No description provided.