alyyousuf7 / twenty48

2048 game on CLI
MIT License
53 stars 3 forks source link
2048 2048-game cli golang

Twenty48

CircleCI codecov

Play 2048 from CLI

2048 on CLI

Use up, down, left and right arrow keys to play, and ESC to quit.

The default grid size is 8x8 which can be changed be setting -width and -height flags.

$ twenty48 [-width=8] [-height=8]

Install

Requires Golang:

$ go get -u github.com/alyyousuf7/twenty48/cmd/twenty48

Development

On host machine with Golang installed:

$ make test   # execute test
$ make binary # build the executable in bin/

Or using Docker:

$ make shell  # jump into a container
root@container:/twenty48# make test
root@container:/twenty48# make binary
root@container:/twenty48# exit

The Docker container mounts a volume to bin/ to copy executable to host machine.

TODOs

PRs are most welcome!

License

MIT