Skip to content
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

[럿고] 블랙잭 1단계 미션 제출합니다. #11

Merged
merged 46 commits into from
Mar 18, 2020
Merged

[럿고] 블랙잭 1단계 미션 제출합니다. #11

merged 46 commits into from
Mar 18, 2020

Conversation

ksy90101
Copy link

피드백 주시면 피드백 확인후에 하면서 고민되었던 부분에 대해서 DM으로 따로 질문 드리도록 하겠습니다! ㅠㅠ
항상 리뷰 해주시느라 수고하십니다! 이번에도 잘 부탁드리겠습니다.

LTTTTTE and others added 30 commits March 10, 2020 14:15
# Conflicts:
#	src/main/java/view/OutputView.java
Copy link

@jeonghoon1107 jeonghoon1107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 럿고!
리뷰가 늦어서 죄송합니다 ㅠㅠ
깔끔하게 구현 잘 하셨네요 👍
피드백을 남겼으니 확인부탁드려요 :)

dealer.addCard(deck.popCard(INIT_CARD_SIZE));
}

public Map<String, WinOrLose> generateGameResults() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

결과를 관리하는 객체를 만들면 어떨까요?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result라는 객체를 따로 만들어서 scorematchResult를 가지고 있도록 하였습니다. 나중에 돈이 들어온다면 수익에 대해서도 저장하면 좋을것 같습니다! 2단계때 사용해 보겠습니다.

}

private void addCardAtGamers(Gamers gamers, Deck deck) {
addCardAtPlayers(gamers, deck);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

player와 dealer를 get으로 가져오지 않고 메시지를 전달하면 어떨까요?

Copy link
Author

@ksy90101 ksy90101 Mar 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가 카드에 대한 로직을 gamers로 옮겼습니다!! 근데 이렇게 되면 도메인에서 View를 접근하게 되는데, 다른 방법이 있을지 궁금합니다. 사실 View를 Controller에서만 사용하려고 해서 Controller에 이 로직을 넣은 것인데, 이 부분에 대해서 의견을 듣고 싶습니다!

Copy link

@jeonghoon1107 jeonghoon1107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 럿고!
깔끔하네요 👍
피드백은 다음 미션에 반영해주세요 :)

private static final int ACE_HIDDEN_SCORE = 10;
private static final int DRAW_CARD_PIVOT = 21;

private MatchResult matchResult;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용하지 않는 필드는 제거하는 것이 좋을 것 같아요!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맨 처음 생각과 다르게 구현이 되서 놓쳤네요! 삭제했습니다!


public static void printGameResults(Gamers gamers) {
printCardsResultAndScore(gamers);
printPlayersWinOrLose(gamers.generateGameResults());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

계산을 view에서 하지 않고 view로 넘겨주면 어떨까요?

Copy link
Author

@ksy90101 ksy90101 Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2단계에서 게임결과는 출력할 필요없고 수익금에 대해서만 출력해주면 되는데, 수익금에 대한 계산은 view에서 안하도록 했습니다.

@jeonghoon1107 jeonghoon1107 merged commit 515ffa7 into woowacourse:ksy90101 Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants