Created
September 22, 2018 11:04
-
-
Save wingyplus/e6d7c6420353443e17d6727c2bfb3cdf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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