https://github.com/robertpeteuil/minesweeper
Go implementation of Minesweeper game API
https://github.com/robertpeteuil/minesweeper
Last synced: 6 months ago
JSON representation
Go implementation of Minesweeper game API
- Host: GitHub
- URL: https://github.com/robertpeteuil/minesweeper
- Owner: robertpeteuil
- Created: 2020-06-25T20:05:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-22T00:21:29.000Z (about 5 years ago)
- Last Synced: 2025-02-14T14:56:53.094Z (8 months ago)
- Language: Go
- Size: 3.05 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minesweeper
Go(lang) implementation of Minesweeper game API
[Minesweeper History](https://en.wikipedia.org/wiki/Minesweeper_(video_game))
## Build Binary
``` sh
go build -o build/minesweeper .
```## Run Binary
``` sh
./build/minesweeper
```## Build Container
``` sh
./build-docker.sh
```## Create a New Game
``` sh
curl -i -X POST '127.0.0.1:3000/game' -d '{"name": "teste", "rows": 10, "cols": 8, "mines": 20}'
```## Start the game
``` sh
curl -i -X POST '127.0.0.1:3000/game/teste/start'
```## Play
``` sh
curl -i -X POST '127.0.0.1:3000/game/teste/click' -d '{"row": 1,"col":1}'
```## Run tests
``` sh
go clean $(go list ./... | grep -v /vendor/)
go test $(go list ./... | grep -v /vendor/) -v
```