-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
커밋메세지를 조금 더 자세히 적으면 좋을 것 같아요! 깔끔한 코드 잘봤습니다😊
@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; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 비슷하게 코드를 짜보았는데, 네트워킹 시간에 파트장님이 말씀해주신대로 매직넘버를 관리하면 더 좋을 것 같네요!
There was a problem hiding this 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")) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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)에 해당하는 부분들은 별도 메서드로 작성해주면 코드의 중복을 줄일 수 있을 것 같아요!
commit1