2048wc is an implementation of a business idea for a website, where people can challenge their friends in 2048 to win (or loose) bragging rights or tiny amount of money.
After cloning this repository execute
source setup2048 to:
- Check if you have go environment installed. You have to install it yourself.
- Set up a pre-commit hook, which will bar you from pushing broken or unformatted code to git.
- Set up GOPATH environment variable.
You should execute the script every time before you start working on the project.
You have to execute this script in the root of the repository (directory where the
setup2048 file lives).
All modules depend on API2048, which contains a single file with all interfaces implemented by this project.
boardLib is a library implementing game logic of 2048. It supports serialisation of a game board into and from json. Because of this serialisation capability, boardLib can be combined with a database and a dynamic web server to build a gaming platform.
boardLib implements API2048.Move and API2048.MoveCreator interfaces.
boardLib does not have any dependencies.
boardLib is a library. It can't be run.
Simple command line interface, which talks directly to boardLib without any database or web server. It doesn't depend on ncurses either, and is therefore a bit crude (no screen refereshing, you have to choose direction and press enter).
simpleCLI does not implement any interfaces.
simpleCLI depends on boardLib.
simpleCLI can be run with
source setup2048 && go build simpleCLI && ./simpleCLI
mockDB is an in-memory pure-Go implementation of the database part of the project. As the data does not get persisted to disk, this can't be used in production, but is useful for testing, debugging, presentations and any other situation when running a database is not preferred.
mockDB implements API2048.QueryCallback, API2048.Query and API2048.QueryBuilder interfaces.
mockDB does not have any dependencies.
mockDB is library-like and can't be run directly.