Hello and welcome to this programming kata.
This kata consists of several parts where you have to solve one part before the next is revealed, kinda like some sort of advent calendar that you might have heard of.
While you could speed through this kata by just solving the problems as quickly as possible, the intention of this kata is to practice Test Driven Development and as such you're recommended to think about this as production code and write proper tests for your implementation.
Where appropriate, an example will be shown to better explain the problem. These examples are perfect for an initial test case. I do recommend that you write more tests than just based on the example though, the aim, after all, is to drive development by passing tests.
Good luck!
/Raniz
Beep, beep, beep.
The autopilot on the StarCruiser X MK. 1b - the latest prototype luxury space yacht you're testing - is requesting your attention. You grudgingly get out of the hot-tub, put on your clothes and walk to the bridge to check out whatever is up with the autopilot.
When you arrive at the helm you see red screens everywhere. Thinking that it might be a good idea to sound more than a few beeps if the entire cockpit is lit up in red you walk over to the closest display to see what's wrong.
Ah, the security requirements from the Terran Space Aviation Comission specify that all critical systems must use generated codes for system maintenance. Remembering that the manufacturer mentioned something about a code-generating device you walk back to the hot-tub and start looking through your stuff.
After looking through all your bags and still not finding anything even remotely looking like a code-generating device you start rummaging around the hot tub and when you lift the coaster to look beneath it you see a small display on the underside.
P|*|E|A|%|E|^|S|)|&|N| |S|7|E|D
Oups. It seems the "coaster" was the code-generator, and it doesn't seem to have appreciated the Trappist ale Obviously, Trappist ale refers to the ale brewed by the monks of Trappist-1d in the Trappist-1 system in the Aquarius constellation you spilled on it.
Back to the cockpit it is. You take the manual from the bookshelf and quickly find the page that documents the code generation routine.
Your CipherSynth 3000 contains everything that is needed to generate emergency codes. Please use the CipherSynth 3000 to generate emergency codes.
The algorithm for generating the emergency codes is a standard Marvin TPA reduction algorithm. A brief explanation follows:
Disclaimer 1: The Marvin TPA Algorithm uses 1-based positioning - i.e. A has position 1. Disclaimer 2: The Marvin TPA Algorithm considers Y a wovel and W a consonant.
For further explanation here is a sample for reducing the seed ABCDEFGHIJKLMNOPQRSTUVWXYZ:
Calculate the emergency reboot code with the seed from the console.
This work is licensed under a Creative Commons Attribution 4.0 International License.