Skip to content

Instantly share code, notes, and snippets.

@bucketh3ad
Last active December 11, 2015 06:58
Show Gist options
  • Save bucketh3ad/4562481 to your computer and use it in GitHub Desktop.
Save bucketh3ad/4562481 to your computer and use it in GitHub Desktop.
Possible Konami Code Fixes
Possibility 1:
self.konami = { 'UP', 'UP', 'DOWN', 'DOWN', 'LEFT', 'RIGHT', 'LEFT', 'RIGHT', 'JUMP', 'ATTACK' }
TO
self.konami = { 'UP', 'UP', 'DOWN', 'DOWN', 'LEFT', 'RIGHT', 'LEFT', 'RIGHT', 'SELECT', 'ATTACK' }
Possibilty 2:
if self.konami[self.konami_idx + 1] == button then
self.konami_idx = self.konami_idx + 1
else
self.konami_idx = 0
end
TO
if self.konami[self.konami_idx + 1] == button then
self.konami_idx = self.konami_idx + 1
if self.konami_idx ~= #self.konami then return end
else
self.konami_idx = 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment