Skip to content
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.

marmelab/15-puzzle-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onboarding 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.

15-puzzle-go

A CLI tool to play the 15 puzzle game, in Go.

See the related article on the Marmelab blog

Help

Print all available commands

make

Build

Install

Install the dependencies, compile the code and build the docker

make install

Install prod

Install the dependencies, compile the code and build the docker in production mode

make install-prod

Publish

Publish the docker in the docker hub 15-puzzle-api. Note: be careful, you should be logged before!

make publish

Run the project

Run the CLI game

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 webserver

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

Contributing

Test

Run all tests

make test

Linter

Run the gofmt linter

make lint

About

A CLI tool to play the 15-puzzle game, in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published