Skip to content

chess 첫 PR 보내겠습니다 ! - #7

Merged
javajigi merged 6 commits into
code-squad:jongsoopark1from
willthd:step1
Jan 8, 2018
Merged

javajigi merged 6 commits into
code-squad:jongsoopark1from
willthd:step1

Conversation

@willthd

@willthd willthd commented Jan 8, 2018

Copy link
Copy Markdown

피드백 부탁드립니다 ~

@javajigi javajigi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

내가 힌트를 많이 주기는 했지만 그래도 코드 구현이 깔끔하네. 지금 코드가 tab과 space가 혼용되고 있는 부분이 보인다. 그 부분은 빨리 해결하면 좋겠다.

Comment thread src/main/java/chess/Board.java Outdated

public class Board {

List<Rank> ranks = new ArrayList<Rank>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

인스턴스 변수는 특별한 이유가 없는 겨우 private으로 구현하며 좋겠다.

Comment thread src/main/java/chess/Board.java Outdated
ranks.add(Rank.initializeBlank());
ranks.add(Rank.initializeBlank());
ranks.add(Rank.initializeWhitePawns());
ranks.add(Rank.initializeWhitePieces());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tab과 space가 혼용되어 사용하고 있음.
둘 중 하나만 사용.

Comment thread src/main/java/chess/Rank.java Outdated
rank.pieces.add(Piece.createWhitePawn());
}
return rank;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이 메소드도 tab과 space가 혼용되고 있다.
프로젝트 제일 상위에서 ctrl + shift + f 통해서 formating 맞춘다.
tab과 space 중 하나를 정해 eclipse 설정한 후 사용한다.

Comment thread src/main/java/chess/Rank.java Outdated
rank.pieces.add(Piece.createBlackPawn());
}
return rank;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이 메소드도 tab과 space가 혼용되고 있다.

Comment thread src/main/java/chess/Rank.java Outdated
double point = 0;
for (Piece piece : pieces) {
if (piece.getColor() == color) {
point += piece.getType().getDefaultPoint();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이와 같이 dot(.)이 2개 이상 등장하지 않도록 한다.
piece.getDefaultPoint()와 같이 구현한다.

private String position;

public Position(String position) {
this.position = position;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

position이 유효성을 생성자에서 판단하면 좋겠다.

@javajigi
javajigi merged commit d4b0262 into code-squad:jongsoopark1 Jan 8, 2018
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