This Kata is about refactoring the legacy code to simplify it, then add the new feature requests to the refactored code. At the same time, pin-down tests help us to keep the legacy code behavior not altered.
Techniques used:
- Refactoring: Extract Constant strings.
- Refactoring: Extract Constant Numbers.
- Refactoring: Extract Variable/Extract Method.
- Refactoring: Simplify Arithmetic.
- Refactoring: Simplify Booleans.
- Refactoring: Group-Related Logic.
- Refactoring: Final Touches.
- Add the new behavior to refactored code.