Commit Graph

10 Commits

Author SHA1 Message Date
Maarten Parmentier
ad848a8e14 Clean up the update_quality method by adding an item-class mapping 2023-06-27 22:09:44 +02:00
Maarten Parmentier
fbae17fd32 Move items to their own classes 2023-06-27 21:53:46 +02:00
Maarten Parmentier
815ba7ce24 Reuse some methods make methods more verbose
I was doubting if instead of decreasing the quality in 2 steps, adding a parameter to the decrease_quality method and decrease it in 1 go was a better option.
I didnt go for it in the end as I like the verbosity at the moment and it's easier to follow later on why we decrease multiple times instead of e.g. decrease_quality(n) method
2023-06-27 21:10:03 +02:00
Maarten Parmentier
cc494bf27e Extract normal item cases
All tests pass, both rspec as texttests. This gives me a good base to start implementing Conjured items.
The idea is to implement Conjured items first before starting to clean up the code.
My thought process when implementing new code is always: make it work -> make it safe -> clean it up
2023-06-27 20:37:29 +02:00
Maarten Parmentier
14363a173b Extract Backstage Passes 2023-06-27 20:32:24 +02:00
Maarten Parmentier
3d86d3d0ef Extract 'Aged Brie'
Also noticed I made a mistake in some specs, would normally optimise spec code later on.
Added an extra test for when sell_in is 1 for safety as it depends on the order of operations in the extraction I make.
2023-06-27 20:22:05 +02:00
Maarten Parmentier
6d4bc3f8af Extract the first item case: "Sulfuras" 2023-06-27 19:47:49 +02:00
Agata Werszler
50daf3f025 Change line separator from CRLF to LF 2020-09-25 16:45:40 +02:00
Peter Kofler
75a2a15f14 format Ruby code (only whitespace changes) 2014-01-25 23:01:39 +01:00
emilybache
567c27854a Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00