Gordle
Gordle
¡Una implementación golang TUI del popular concurso de palabras Wordle!
Requisitos del sistema
Se debe instalar un diccionario del sistema. En sistemas basados en Debian ejecutar $ apt-get install wbritish
o $ apt-get install wamerican
.
$ go run ./cmd/cli
Welcome to 🟩🟨⬛ Gordle ⬛🟨🟩
You have 6 trys to guess the word of the day.
NOTE: The current implementation will pick a new word on every run!
🟩 means, the letter is in the word and in the correct spot.
🟨 means, that the letter is in the word but in the wrong spot.
⬛ means, that the letter is in not in the word in any spot.
Enter 5 characters alter
⬛🟨🟨🟨🟨 (Try 1/6): alter
Enter 5 characters rutel
🟨⬛🟨🟨🟨 (Try 2/6): rutel
Enter 5 characters rolet
🟨⬛🟨🟨🟨 (Try 3/6): rolet
Enter 5 characters toler
🟨⬛🟨🟨🟨 (Try 4/6): toler
Enter 5 characters mulls
⬛⬛🟨🟨🟨 (Try 5/6): mulls
Enter 5 characters mills
⬛🟩🟨🟨🟨 (Try 6/6): mills
Your Gordle results (2022-01-18):
⬛🟨🟨🟨🟨 (1/6): alter
🟨⬛🟨🟨🟨 (2/6): rutel
🟨⬛🟨🟨🟨 (3/6): rolet
🟨⬛🟨🟨🟨 (4/6): toler
⬛⬛🟨🟨🟨 (5/6): mulls
⬛🟩🟨🟨🟨 (6/6): mills
The solution was: lister
Edificio
- Cree el comando cli (alternativamente
$ task build
si está utilizando Task):
$ go build ./cmd/cli
<Empty output on build success>
Correr
- Ejecutar (alternativamente
$ task run
si está utilizando Task):
$ go run ./cmd/cli
[...]
- O ejecute esto después de haber compilado el comando:
$ ./cli
[...]
Ejecución de pruebas
- Ejecute el conjunto de pruebas con la cobertura habilitada (alternativamente
$ task test
si está utilizando Task):
$ go test -race ./... -coverprofile cp.out
? github.com/TheDonDope/gordle/cmd/cli [no test files]
ok github.com/TheDonDope/gordle/pkg/game 0.584s coverage: 63.8% of statements
ok github.com/TheDonDope/gordle/pkg/storage 0.019s coverage: 57.1% of statements
- Abra los resultados en el navegador:
$ go tool cover -html cp.out -o cp.html
<Opens Browser>