fix: don't show word on replay
This commit is contained in:
parent
dbfbf0efa2
commit
3ab9f195a3
6
main.go
6
main.go
|
@ -145,8 +145,10 @@ func (m model) View() string {
|
||||||
s += promptStyle.Render(footer) + "\n"
|
s += promptStyle.Render(footer) + "\n"
|
||||||
} else {
|
} else {
|
||||||
msg := ""
|
msg := ""
|
||||||
if m.board.CurrentGuess >= 6 {
|
if m.board.CurrentGuess == -1 {
|
||||||
msg += fmt.Sprintf("Oof! The word was %s.", m.board.Solution)
|
if m.board.Solution != "" {
|
||||||
|
msg += fmt.Sprintf("Oof! The word was %s.", m.board.Solution)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
msg += fmt.Sprintf("Congrats! You guessed in %d.", m.board.CurrentGuess)
|
msg += fmt.Sprintf("Congrats! You guessed in %d.", m.board.CurrentGuess)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue