No longer rendering spaces as secret characters
This commit is contained in:
parent
30d42a3219
commit
887e0556bf
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
fantastic
|
||||
achieve
|
||||
this is a spaced sentence
|
||||
security
|
||||
tool
|
||||
cathedral
|
||||
|
|
Loading…
Reference in New Issue