Open
Conversation
wlsdnjs829
requested changes
Nov 27, 2023
wlsdnjs829
left a comment
There was a problem hiding this comment.
안녕하세요, 승화님😊
블랙잭의 첫 시작을 잘 해 주셨네요. 👏🏾
요구사항 몇 개 수정되면 좋을 거 같아, 코멘트로 남겨드렸습니다.
확인 후 다시 PR 요청 부탁드립니다. 궁금한 부분은 언제든 DM 주세요. 👍🏽
Comment on lines
+5
to
+9
| return when (input) { | ||
| "y" -> true | ||
| "n" -> false | ||
| else -> throw IllegalArgumentException("올바른 입력을 해주세요") | ||
| } |
|
|
||
| class ListCardDeck( | ||
| private val cards: MutableList<Card> | ||
| ): CardDeck { |
| } | ||
|
|
||
| fun stop(): Int { | ||
| return ScoreCalculator.calc(cards) |
There was a problem hiding this comment.
p2; stop이라는 메서드에서 계산까지 해주는 형태네요. 플레이어가 ScoreCalculator를 알아야 할지 고민해 보면 좋을 거 같아요.
Comment on lines
+3
to
+7
| class RandomCardDeck: CardDeck { | ||
| override fun drawCard(): Card { | ||
| return Card.values().random() | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
p1; 카드덱은 정해져 있고, 그 과정에서 랜덤하게 나와야 할 거 같은데 이 구조라면 A(다이아), A(다이아), A(다이아)... 처럼 동일한 카드와 형태를 받을 수도 있을 거 같아요.
Comment on lines
+3
to
+9
| ## 요구사항 | ||
| - 카드의 숫자 계산은 카드 숫자를 기본으로 하며 | ||
| - Ace는 1 또는 11로 계산할 수 있으며 | ||
| - King, Queen, Jack은 각각 10으로 계산한다. | ||
| - 게임을 시작하면 플레이어는 두 장의 카드를 지급 받으며 | ||
| - 두 장의 카드 숫자를 합쳐 21을 초과하지 않으면서 21에 가깝게 만들면 이긴다. | ||
| - 21을 넘지 않을 경우 원한다면 얼마든지 카드를 계속 뽑을 수 있다. No newline at end of file |
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.

잘 부탁 드립니다