No longer rendering spaces as secret characters

This commit is contained in:
raul 2024-02-13 07:37:54 +00:00
parent 30d42a3219
commit 887e0556bf
2 changed files with 7 additions and 3 deletions

View File

@ -36,10 +36,13 @@ func main() {
filePath = os.Args[1]
randWord = getWord(filePath)
for range randWord {
// TODO: Detect spaces in string and don't set them to "_"
for _, v := range randWord {
if string(v) == " " {
hiddenChars = append(hiddenChars, " ")
} else {
hiddenChars = append(hiddenChars, "_")
}
}
for _, v := range randWord {
revealedChars = append(revealedChars, string(v))
}

View File

@ -1,5 +1,6 @@
fantastic
achieve
this is a spaced sentence
security
tool
cathedral