Skip to content

Instantly share code, notes, and snippets.

@iboss-ptk
Last active September 22, 2018 05:45
Show Gist options
  • Select an option

  • Save iboss-ptk/8b708cedeab360ca32b47714d7a38e1a to your computer and use it in GitHub Desktop.

Select an option

Save iboss-ptk/8b708cedeab360ca32b47714d7a38e1a to your computer and use it in GitHub Desktop.
require 'set'
def hangman(secret_word, letters)
Set[*secret_word.chars].subset? Set[*letters]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment