improve feedback

This commit is contained in:
Gabriel Augendre 2023-08-16 20:26:27 +02:00
parent e5463dd0bf
commit 198d5e85ec
3 changed files with 9 additions and 6 deletions

View file

@ -2,4 +2,7 @@ test:
go test ./...
lint:
golangci-lint run
golangci-lint run
run:
go run cmd/cli/main.go -f contrib/pli07.txt

View file

@ -55,9 +55,9 @@ func main() {
switch {
case errors.Is(err, gordle.ErrGameWon):
fmt.Println("you won")
fmt.Println("🎉 you won")
case errors.Is(err, gordle.ErrGameLost):
fmt.Println("you lost")
fmt.Printf("😔 you lost, the correct word was %s\n", word)
}
}
}

View file

@ -40,9 +40,9 @@ func (ff FullFeedback) String() string {
}
const (
FeedbackNotInWord = Feedback("N")
FeedbackWrongPlace = Feedback("W")
FeedbackCorrect = Feedback("C")
FeedbackNotInWord = Feedback("⬜️")
FeedbackWrongPlace = Feedback("🟡")
FeedbackCorrect = Feedback("💚")
)
type Game struct {