mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
73 lines
1.7 KiB
Plaintext
73 lines
1.7 KiB
Plaintext
@startuml
|
|
|
|
skinparam backgroundColor transparent
|
|
|
|
start
|
|
note left
|
|
Do this for each item in the list.
|
|
An item has a name, a sell in value and a quality value
|
|
end note
|
|
|
|
if (not "Aged Brie" and not "Backstage passes to a TAFKAL80ETC concert") then (yes)
|
|
if (quality > 0) then (yes)
|
|
if (not "Sulfuras, Hand of Ragnaros") then (yes)
|
|
:lower quality with 1;
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
if (quality < 50) then (yes)
|
|
:increase quality with 1;
|
|
if ("Backstage passes to a TAFKAL80ETC concert") then (yes)
|
|
if (sell in < 11) then (yes)
|
|
if (quality < 50) then (yes)
|
|
:increase quality with 1;
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
if (sell in < 6) then (yes)
|
|
if (quality < 50) then (yes)
|
|
:increase quality with 1;
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
endif
|
|
|
|
if (not "Sulfuras, Hand of Ragnaros") then (yes)
|
|
:lower sell in with 1;
|
|
else (no)
|
|
endif
|
|
|
|
if (sell in < 0) then (yes)
|
|
if (not "Aged Brie") then (yes)
|
|
if (not "Backstage passes to a TAFKAL80ETC concert") then (yes)
|
|
if (quality > 0) then (yes)
|
|
if (not "Sulfuras, Hand of Ragnaros") then (yes)
|
|
:lower quality with 1;
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
endif
|
|
else (no)
|
|
:lower quality with quality;
|
|
endif
|
|
else (no)
|
|
if (quality < 50) then (yes)
|
|
:increase quality with 1;
|
|
else (no)
|
|
endif
|
|
endif
|
|
else (no)
|
|
endif
|
|
|
|
stop
|
|
|
|
@enduml
|