Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add wordle api * update wordle readme
- Loading branch information
Showing
20 changed files
with
17,300 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
wordle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM alpine | ||
ADD wordle /wordle | ||
ENTRYPOINT [ "/wordle" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
GOPATH:=$(shell go env GOPATH) | ||
.PHONY: init | ||
init: | ||
go install github.com/golang/protobuf/protoc-gen-go@latest | ||
go install github.com/micro/micro/v3/cmd/protoc-gen-micro@latest | ||
go install github.com/micro/micro/v3/cmd/protoc-gen-openapi@latest | ||
|
||
.PHONY: api | ||
api: | ||
protoc --openapi_out=. --proto_path=. proto/wordle.proto | ||
|
||
.PHONY: proto | ||
proto: | ||
protoc --proto_path=. --micro_out=. --go_out=:. proto/wordle.proto | ||
|
||
.PHONY: build | ||
build: | ||
go build -o wordle *.go | ||
|
||
.PHONY: test | ||
test: | ||
go test -v ./... -cover | ||
|
||
.PHONY: docker | ||
docker: | ||
docker build . -t wordle:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Multiplayer wordle | ||
|
||
# Wordle Service | ||
|
||
Guess the WORDLE in six tries. Each guess must be a valid five-letter word. | ||
|
||
The highlight will show how close you are using [] square brackets for correct positions and {} parenthesis for | ||
letters in the word but in the wrong position, anything not highlighted is incorrect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"guess": [ | ||
{ | ||
"title": "Make a guess", | ||
"description": "Make a guess", | ||
"request": { | ||
"word": "noise" | ||
}, | ||
"response": { | ||
"correct": false, | ||
"tries_left": 0, | ||
"guesses": [ | ||
{ | ||
"word": "noise", | ||
"highlight": "no{i}[s]e", | ||
"chars": [ | ||
{ | ||
"letter": "n", | ||
"position": 0, | ||
"correct": false, | ||
"in_word": false | ||
}, | ||
{ | ||
"letter": "o", | ||
"position": 1, | ||
"correct": false, | ||
"in_word": false | ||
}, | ||
{ | ||
"letter": "i", | ||
"position": 2, | ||
"correct": false, | ||
"in_word": true | ||
}, | ||
{ | ||
"letter": "s", | ||
"position": 3, | ||
"correct": true, | ||
"in_word": true | ||
}, | ||
{ | ||
"letter": "e", | ||
"position": 4, | ||
"correct": false, | ||
"in_word": false | ||
} | ||
] | ||
} | ||
], | ||
"answer": "tipsy", | ||
"status": "Reached guess limit" | ||
} | ||
} | ||
], | ||
"next": [ | ||
{ | ||
"title": "Next game", | ||
"description": "When is the next game", | ||
"request": {}, | ||
"response": { | ||
"seconds": 36944, | ||
"duration": "10h15m44.854216477s" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package main | ||
|
||
//go:generate make proto |
Oops, something went wrong.