Repository navigation
chess 첫 PR 보내겠습니다 ! - #7
Merged
Merged
Conversation
javajigi
suggested changes
Jan 8, 2018
|
|
||
| public class Board { | ||
|
|
||
| List<Rank> ranks = new ArrayList<Rank>(); |
Contributor
There was a problem hiding this comment.
인스턴스 변수는 특별한 이유가 없는 겨우 private으로 구현하며 좋겠다.
| ranks.add(Rank.initializeBlank()); | ||
| ranks.add(Rank.initializeBlank()); | ||
| ranks.add(Rank.initializeWhitePawns()); | ||
| ranks.add(Rank.initializeWhitePieces()); |
Contributor
There was a problem hiding this comment.
tab과 space가 혼용되어 사용하고 있음.
둘 중 하나만 사용.
| rank.pieces.add(Piece.createWhitePawn()); | ||
| } | ||
| return rank; | ||
| } |
Contributor
There was a problem hiding this comment.
이 메소드도 tab과 space가 혼용되고 있다.
프로젝트 제일 상위에서 ctrl + shift + f 통해서 formating 맞춘다.
tab과 space 중 하나를 정해 eclipse 설정한 후 사용한다.
| rank.pieces.add(Piece.createBlackPawn()); | ||
| } | ||
| return rank; | ||
| } |
Contributor
There was a problem hiding this comment.
이 메소드도 tab과 space가 혼용되고 있다.
| double point = 0; | ||
| for (Piece piece : pieces) { | ||
| if (piece.getColor() == color) { | ||
| point += piece.getType().getDefaultPoint(); |
Contributor
There was a problem hiding this comment.
이와 같이 dot(.)이 2개 이상 등장하지 않도록 한다.
piece.getDefaultPoint()와 같이 구현한다.
| private String position; | ||
|
|
||
| public Position(String position) { | ||
| this.position = position; |
Contributor
There was a problem hiding this comment.
position이 유효성을 생성자에서 판단하면 좋겠다.
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.
피드백 부탁드립니다 ~