mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
Adding UML and 3 points
This commit is contained in:
parent
9bcc8af37d
commit
964e0e3c5e
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "5500-Refactoring_Practice",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {}
|
||||||
|
}
|
||||||
BIN
python/UML.pdf
Normal file
BIN
python/UML.pdf
Normal file
Binary file not shown.
@ -44,3 +44,8 @@ class Item:
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "%s, %s, %s" % (self.name, self.sell_in, self.quality)
|
return "%s, %s, %s" % (self.name, self.sell_in, self.quality)
|
||||||
|
|
||||||
|
|
||||||
|
#The original code relied on a monolithic update_quality method with deeply nested conditional logic
|
||||||
|
#I implemented the Strategy Pattern, decomposing the complex conditional logic into separate classes
|
||||||
|
#Created a new strategy class rather than risking regression bugs by modifying the existing, messy if/else block.
|
||||||
6
python/package-lock.json
generated
Normal file
6
python/package-lock.json
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "python",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {}
|
||||||
|
}
|
||||||
@ -7,8 +7,8 @@ diff_program:meld
|
|||||||
|
|
||||||
|
|
||||||
# Settings for the Python version
|
# Settings for the Python version
|
||||||
#executable:${TEXTTEST_HOME}/python/texttest_fixture.py
|
executable:${TEXTTEST_HOME}/python/texttest_fixture.py
|
||||||
#interpreter:python
|
interpreter:python
|
||||||
|
|
||||||
# Settings for the cpp version
|
# Settings for the cpp version
|
||||||
#executable:${TEXTTEST_HOME}/cpp/cmake-build-debug/test/cpp_texttest/GildedRoseTextTests
|
#executable:${TEXTTEST_HOME}/cpp/cmake-build-debug/test/cpp_texttest/GildedRoseTextTests
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user