Archived Repository The code of this repository was written during a Marmelab agile integration. The associated blog post illustrates the efforts of the new hiree, who had to implement a board game in several languages and platforms as part of his initial learning. This code is not intended to be used in production, and is not maintained. |
A CLI tool to play the 15 puzzle game, in Go.
See the related article on the Marmelab blog
Print all available commands
make
Install the dependencies, compile the code and build the docker
make install
Install the dependencies, compile the code and build the docker in production mode
make install-prod
Publish the docker in the docker hub 15-puzzle-api. Note: be careful, you should be logged before!
make publish
Run the 15-puzzle game in dev or prod mode
make run
Note:
- you can use the environment variable
ENV
to define the running env - you can use the environment variable
SIZE
to define the puzzle size
For example with a size equals to 5:
ENV=prod SIZE=5 make run
Run the 15-puzzle webserver at port 2000 in dev or prod mode
make run-server
Note:
- you can use en environment variable
ENV
to define the running env - you can use en environment variable
PORT
to define the port (from 2000 to 3000)
ENV=prod PORT=2017 make run-server
Run all tests
make test
Run the gofmt linter
make lint