15
2
The Problem
You must write a program that, when the Konami Code is typed in during runtime, prints the string "+30 lives" and sounds a noise of your choice from the computer's speaker.
Definition
The "Konami Code" is defined as UUDDLRLRBA followed by pressing the enter key.
The Rules
- You may choose to use the up arrow for
U, down forD, left forL, and right forR, as long as your code is consistent with either arrows or letters. - Your input may be accepted from a controller or a keyboard, but does not need to support both.
Existing answers may continue to use
BABAinstead ofBA, but may also shorten it if they wish to do so. Future answers should all useBAfor consistency.Empty input doesn't need to be supported.
Comments are not for extended discussion; this conversation has been moved to chat.
– Martin Ender – 2018-02-20T08:27:08.990