mirror of
https://github.com/Crocmagnon/gordle.git
synced 2024-11-24 09:08:11 +01:00
improve feedback
This commit is contained in:
parent
e5463dd0bf
commit
198d5e85ec
3 changed files with 9 additions and 6 deletions
5
Makefile
5
Makefile
|
@ -2,4 +2,7 @@ test:
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
golangci-lint run
|
golangci-lint run
|
||||||
|
|
||||||
|
run:
|
||||||
|
go run cmd/cli/main.go -f contrib/pli07.txt
|
|
@ -55,9 +55,9 @@ func main() {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case errors.Is(err, gordle.ErrGameWon):
|
case errors.Is(err, gordle.ErrGameWon):
|
||||||
fmt.Println("you won")
|
fmt.Println("🎉 you won")
|
||||||
case errors.Is(err, gordle.ErrGameLost):
|
case errors.Is(err, gordle.ErrGameLost):
|
||||||
fmt.Println("you lost")
|
fmt.Printf("😔 you lost, the correct word was %s\n", word)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ func (ff FullFeedback) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FeedbackNotInWord = Feedback("N")
|
FeedbackNotInWord = Feedback("⬜️")
|
||||||
FeedbackWrongPlace = Feedback("W")
|
FeedbackWrongPlace = Feedback("🟡")
|
||||||
FeedbackCorrect = Feedback("C")
|
FeedbackCorrect = Feedback("💚")
|
||||||
)
|
)
|
||||||
|
|
||||||
type Game struct {
|
type Game struct {
|
||||||
|
|
Loading…
Reference in a new issue