Skip to content

alyyousuf7/twenty48

Repository files navigation

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

  • Write more tests
  • Maintain scoreboard
  • Display game over text

PRs are most welcome!

License

MIT