Skip to content

Instantly share code, notes, and snippets.

@wingyplus
Created September 22, 2018 11:04
Show Gist options
  • Save wingyplus/e6d7c6420353443e17d6727c2bfb3cdf to your computer and use it in GitHub Desktop.
Save wingyplus/e6d7c6420353443e17d6727c2bfb3cdf to your computer and use it in GitHub Desktop.
package hangman
import "strings"
func Hangman(word string, inputs []string) bool {
for _, input := range inputs {
if word = strings.Replace(word, input, "", -1); word == "" {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment