Open
Conversation
sah3122
requested changes
Nov 29, 2023
sah3122
left a comment
There was a problem hiding this comment.
딜러 미션 구현 잘해주셨습니다 👍
깔끔한 코드로 구현해주셔서 구현적인 측면보단 몇가지 고민거리를 남겨두었는데 확인 부탁드려요 🙏
| import blackjack.view.InputView | ||
| import blackjack.view.OutputView | ||
|
|
||
| fun main() { |
There was a problem hiding this comment.
main 함수가 너무 많은 책임을 가지고 있는것 같습니다.
블랙잭 게임을 진행하기 위한 클래스를 정의해보는건 어떨까요 ?
Comment on lines
+9
to
+10
| override fun isObtainable(): Boolean { | ||
| return sumOfCards() < BLACKJACK_SCORE |
There was a problem hiding this comment.
플레이어는 더이상 카드를 받지 않지 않는 선언을 할수 있습니다.
input의 값으로 넘기기 보단 플레이어의 상태값을 추가해보는것을 도전해보세요 😄
Comment on lines
+10
to
+11
| val hands | ||
| get() = cards.values |
| private val cardDeck: CardDeck, | ||
| ) { | ||
| private val cards = Cards(cardDeck.next(), cardDeck.next()) | ||
| abstract val openedCards: List<Card> |
There was a problem hiding this comment.
openedCards 를 상태값으로 가지는것도 좋지만 반드시 가지고 있어야 하는것은 아닐것 같아요.
딜러와 참가자간의 오픈 카드룰을 정의하여 함수로 제공하는건 어떨까요 ?
| @@ -0,0 +1,27 @@ | |||
| package blackjack.domain | |||
|
|
|||
| abstract class Participant( | |||
|
|
||
| abstract class Participant( | ||
| val name: String, | ||
| private val cardDeck: CardDeck, |
There was a problem hiding this comment.
참가자 클래스가 카드덱을 들고있는 모델링이 적합한지 고민해보시면 좋을것 같아요.
블랙잭 참가자는 카드덱을 가지고 있다.
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.
안녕하세요~ 리뷰어님 딜러까지 구현했습니다 ㅎㅎ
Participant 추상 클래스를 만들어서 중복 로직을 제거습니다!