Skip to content

사다리 게임 1 단계 구현입니다. #9

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

Merged
merged 4 commits into from
Nov 18, 2018

Conversation

pporotoss
Copy link

No description provided.

Copy link
Contributor

@javajigi javajigi left a comment

Choose a reason for hiding this comment

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

객체 설계와 테스트 코드 구현 좋네요. 💯
피드백 남겼어요.

public class BlockFactory {
private static final Random RANDOM = new Random();

public static Block generateRandomBlock() {
Copy link
Contributor

Choose a reason for hiding this comment

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

이 정도 구현이면 Block에 정적 팩토리 메소드로 구현해도 되지 않을까?

if (before.isSequenceFilledBlock(newBlock)) {
i--;
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

이 부분의 로직을 좀 더 단순하게 구현할 방법은 없을까?
좀 더 객체지향적으로 구현해 로직을 단순화해본다.

@@ -0,0 +1,18 @@
package game.ladder.domain;

public class Line {
Copy link
Contributor

Choose a reason for hiding this comment

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

굳이 이 객체가 필요한가?
Blocks == Line이 아닌가? 두 객체의 역할이 애매모호함.

}

@Test
public void 만들어진_블럭들_연속_채운블록_존재여부() {
Copy link
Contributor

Choose a reason for hiding this comment

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

로직 구현이 복잡하니 테스트 코드 구현 또한 복잡하다.
좀 더 단순하게 테스트할 수 있는 구조의 객체 설계를 해본다.

@javajigi javajigi merged commit c32a064 into next-step:pporotoss Nov 18, 2018
pcspapa added a commit to pcspapa/java-ladder that referenced this pull request Aug 28, 2020
1. 1인의 결과 요청
1. 모두의 결과 요청

Closes next-step#9, next-step#10
parkeeseul pushed a commit that referenced this pull request Sep 3, 2020
* refactor: 리뷰내용 반영

메소드명 동사화
사다리 폭 테스트

* refactor: 모든 원시값과 문자열을 포장한다.

Boolean to Point

* feat: Line 에서의 분석기 (#7)

Closes #7

* refactor: Point 클래스 position 필드 추가에 대한 기존 클래스 변경

* refactor: 모든 원시값과 문자열을 포장한다.

현재 위치 값 index 를 Chessmen 으로 포장함.

* feat: Ladder 에서의 분서기

Closes #6

* feat: 실행 결과 입력하기

Closes #8

* feat: 결과 요청 메시지

Closes #12

* bugfix: LineAnalysis 버그

LineAnalysis 에서 상태 계산 버그.
LineAnalysis 에서 속도 개선을 위한 선택가능한 라인만 추출

* feat: 결과 요처어

1. 1인의 결과 요청
1. 모두의 결과 요청

Closes #9, #10

* refactor: 실행결과 유효성 체크

* feat: 1. 실행 결과 출력하기

Closes #12

* feat: 사다리에 결과값 출력하기

Closes #13

* feat: 일급 일급컬렉션으로 - Players

Closes #14

* feat: 일급 일급컬렉션으로 - Prizes

Closes #15

* feat: 결과를 만드는 행위를 Line, Ladder 에서 하도록 수정하자.

Closes #16

* refactor: Analysis class 삭제 및 중복 제거

* refactor: 리뷰내용 반영
nno0obb pushed a commit to nno0obb/java-ladder that referenced this pull request Apr 7, 2025
testrace pushed a commit that referenced this pull request Apr 10, 2025
* [ladder] step2: .gitignore

* [ladder] step2: README.md

* [ladder] step1: feedback #1

* [ladder] step1: feedback #2

* [ladder] step1: feedback #3

* [ladder] step2: README.md

* [ladder] step2: init

* [ladder] step2: Height

* [ladder] step2: Name

* [ladder] step2: PointX

* [ladder] step2: Line

* [ladder] step2: NameList

* [ladder] step2: README.md

* [ladder] step2: Ladder

* [ladder] step2: PointX

* [ladder] step2: Board

* [ladder] step2: Typo

* [ladder] step2: Typo

* [ladder] step2: Typo

* [ladder] step2: README.md

* [ladder] step2: feedback #1

* [ladder] step2: feedback #2,3

* [ladder] step2: feedback #4,8

* [ladder] step2: README.md

* [ladder] step2: #5

* [ladder] step2: #6,7

* [ladder] step2: README.md

* [ladder] step2: README.md

* [ladder] step2: #9

* [ladder] step2: #10

* [ladder] step2: README.md

* [ladder] step2: Point, Bridge

* [ladder] step2: README.md

* [ladder] step2: feedback #1

* [ladder] step2: feedback #2,3,4,5,6,7

---------

Co-authored-by: bt.7274(김홍균)/kakao <[email protected]>
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.

2 participants