Merges encoding and decoding into one shared caesar(text, shift, direction) function (encrypt/decrypt remain as thin wrappers), adds the interactive encode/decode loop with input validation and a "go again" prompt, adds a coloured ASCII title (plain when not a TTY or NO_COLOR is set), and extends tests and docs.
Merges encoding and decoding into one shared `caesar(text, shift, direction)` function (`encrypt`/`decrypt` remain as thin wrappers), adds the interactive encode/decode loop with input validation and a "go again" prompt, adds a coloured ASCII title (plain when not a TTY or NO_COLOR is set), and extends tests and docs.
Part 3 of 3 (Part 1: #1, Part 2: #2).
- Replace separate encrypt/decrypt with shared caesar() function
- Add direction constants (DIRECTION_ENCODE, DIRECTION_DECODE) and
prompts
- Update main.py to support interactive encode/decode loop
- Keep encrypt/decrypt as wrappers for backward compatibility
- Add tests for caesar() with both directions and error handling
- Update tests for main.py with interactive scenario tests
Tirsvad
merged commit 27952755d3 into main2026-10-04 07:26:15 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Merges encoding and decoding into one shared
caesar(text, shift, direction)function (encrypt/decryptremain as thin wrappers), adds the interactive encode/decode loop with input validation and a "go again" prompt, adds a coloured ASCII title (plain when not a TTY or NO_COLOR is set), and extends tests and docs.Part 3 of 3 (Part 1: #1, Part 2: #2).