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차 과제 제출 #7

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Jeonkyujin
Copy link
Member

commit1

@Jeonkyujin Jeonkyujin closed this Sep 30, 2024
@Jeonkyujin Jeonkyujin reopened this Sep 30, 2024
@Jeonkyujin Jeonkyujin changed the title commit 1 [전규진] 1차 과제 제출 Sep 30, 2024
Copy link
Member

@shinyj0 shinyj0 left a comment

Choose a reason for hiding this comment

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

커밋메세지를 조금 더 자세히 적으면 좋을 것 같아요! 깔끔한 코드 잘봤습니다😊

Comment on lines 10 to 24
@Override
public void updateQuality() {
if (item.sellIn == 0) {
item.quality = 0;
} else if (item.sellIn <= 5) {
item.quality += 3;
if (item.quality > 50) {
item.quality = 50;
}
} else if (item.sellIn <= 10) {
item.quality += 2;
if (item.quality > 50) {
item.quality = 50;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

저도 비슷하게 코드를 짜보았는데, 네트워킹 시간에 파트장님이 말씀해주신대로 매직넘버를 관리하면 더 좋을 것 같네요!

Copy link
Member

@0-x-14 0-x-14 left a comment

Choose a reason for hiding this comment

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

코드 잘 봤습니다!

updatingItems[i] = new AgedBrieItem(items[i]);
} else if (items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) {
updatingItems[i] = new BackStageItem(items[i]);
} else if (items[i].name.equals("Conjured Mana Cake")) {
Copy link
Member

Choose a reason for hiding this comment

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

테스트 코드 외에 다른 Conjured 아이템도 처리할 수 있도록 구현하면 유지보수 측면에서 더 좋을 것 같습니다!

}
} else {
item.quality -= 4;
if (item.quality < 0) {
Copy link
Member

Choose a reason for hiding this comment

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

if (item.quality > 50)와 if (item.quality < 0)에 해당하는 부분들은 별도 메서드로 작성해주면 코드의 중복을 줄일 수 있을 것 같아요!

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.

3 participants