-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f86cf4
commit 99dc6fc
Showing
10 changed files
with
89 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.gildedrose; | ||
|
||
public abstract class UpdateItem { | ||
protected void decreaseSellIn(Item item) { | ||
item.sellIn -= 1; | ||
} | ||
|
||
protected void increaseQuality(Item item) { | ||
item.quality += 1; | ||
} | ||
|
||
protected void decreaseQuality(Item item) { | ||
item.quality -= 1; | ||
} | ||
|
||
protected void doubleDecreaseQuality(Item item) { | ||
item.quality -= 2; | ||
} | ||
|
||
protected void fixQuality(Item item) { | ||
if (item.quality > 50) { | ||
item.quality = 50; | ||
} | ||
if (item.quality < 0) { | ||
item.quality = 0; | ||
} | ||
} | ||
|
||
protected abstract void updateQuality(); | ||
} |
This file was deleted.
Oops, something went wrong.