Skip to main content
Commonmark migration
Source Link

#The Problem

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

Definition

The "Konami Code" is defined as UUDDLRLRBA followed by pressing the enter key.

###The Rules

The Rules

  • You may choose to use the up arrow for U, down for D, left for L, and right for R, 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 BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

  • Empty input doesn't need to be supported.

#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 for D, left for L, and right for R, 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 BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

  • Empty input doesn't need to be supported.

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 for D, left for L, and right for R, 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 BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

  • Empty input doesn't need to be supported.

Mod Moved Comments To Chat
edited tags
Link
ya don't need that, plus apparently empty input is ok
Source Link
Riker
  • 7.9k
  • 4
  • 39
  • 73

#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 for D, left for L, and right for R, as long as your code is consistent with either arrows or letters.

    You may choose to use the up arrow for U, down for D, left for L, and right for R, 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.

    Your input may be accepted from a controller or a keyboard, but does not need to support both.

  • Existing answers may continue to use BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

    Existing answers may continue to use BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

  • Empty input doesn't need to be supported.

05AB1E wins

#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 for D, left for L, and right for R, 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 BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

05AB1E wins

#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 for D, left for L, and right for R, 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 BABA instead of BA, but may also shorten it if they wish to do so. Future answers should all use BA for consistency.

  • Empty input doesn't need to be supported.

added 20 characters in body
Source Link
user63187
user63187
Loading
Tweeted twitter.com/StackCodeGolf/status/809869054433521667
Removed unnecessary information - this is covered by one of the rules.
Source Link
Addison Crump
  • 11.2k
  • 1
  • 44
  • 90
Loading
Post Reopened by Addison Crump, Riker, mbomb007, Blue, acrolith
edited body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading
added 162 characters in body
Source Link
Addison Crump
  • 11.2k
  • 1
  • 44
  • 90
Loading
added 105 characters in body
Source Link
user63187
user63187
Loading
Assuming that changes were requested: http://meta.codegolf.stackexchange.com/questions/10910/reopen-my-question-that-has-several-correct-answers/10913?noredirect=1#comment35703_10913
Source Link
Addison Crump
  • 11.2k
  • 1
  • 44
  • 90
Loading
deleted 314 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading
added 266 characters in body
Source Link
user63187
user63187
Loading
Post Closed as "Needs details or clarity" by FlipTack, Peter Taylor, cat, betseg, Riker
added 117 characters in body
Source Link
user63187
user63187
Loading
edited title
Link
cat
  • 5.9k
  • 2
  • 26
  • 44
Loading
added 9 characters in body
Source Link
user63187
user63187
Loading
Removed a space that seems to be confusing people as to what the contra code is, made some other cosmetic improvements
Source Link
Loading
deleted 2 characters in body
Source Link
Mukul Kumar
  • 2.7k
  • 1
  • 20
  • 29
Loading
Post Reopened by Wheat Wizard, redstarcoder, Pavel, TuxCrafting, user41805
There really are only 3 rules, rule 4 was an extension of rule 1
Source Link
Loading
added 50 characters in body
Source Link
user63187
user63187
Loading
added 47 characters in body
Source Link
user63187
user63187
Loading
Post Closed as "Needs details or clarity" by user62131, trichoplax is on Codidact now, Riley, mbomb007, TheBikingViking