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"
|
||||
} else {
|
||||
msg := ""
|
||||
if m.board.CurrentGuess >= 6 {
|
||||
msg += fmt.Sprintf("Oof! The word was %s.", m.board.Solution)
|
||||
if m.board.CurrentGuess == -1 {
|
||||
if m.board.Solution != "" {
|
||||
msg += fmt.Sprintf("Oof! The word was %s.", m.board.Solution)
|
||||
}
|
||||
} else {
|
||||
msg += fmt.Sprintf("Congrats! You guessed in %d.", m.board.CurrentGuess)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue