-
Notifications
You must be signed in to change notification settings - Fork 10
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
[이재빈] up and down 3단계 #13
Open
JaeBeen95
wants to merge
45
commits into
whatever-mentoring:main
Choose a base branch
from
JaeBeen95:mission-3
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 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.
요구 사항
멘토님께
상태 관리 함수를 클래스로 바꿔보았습니다. 현재 제 코드 로직 특성 상 클래스의 경우 매 게임마다 새로운 인스턴스를 생성하기에 reset 함수가 불필요하다고 판단하여 제거했습니다.
지난 번 코드 리뷰에서 동현님이 상태가 더 많아졌을 때를 고려해보면 좋을 것 같다고 하셔서, 사용자가 전달해주는 값을 제외하고 매번 초기화가 일어날 필요가 있는 값들은 #initializeState()라는 메서드로 따로 분리해서 constructor 안에서 호출하는 형태로 분리해보았습니다.
보호해야할 변수에는 private(#) 프로퍼티로 만들어주었습니다.
아직 테스트 코드를 작성하는 데 시간이 너무 오래걸리네요.. 나머지 함수들도 최대한 작성해보겠습니다.