Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alyyousuf7/twenty48
2048 game on CLI
https://github.com/alyyousuf7/twenty48
2048 2048-game cli golang
Last synced: about 4 hours ago
JSON representation
2048 game on CLI
- Host: GitHub
- URL: https://github.com/alyyousuf7/twenty48
- Owner: alyyousuf7
- License: mit
- Created: 2018-04-30T10:59:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-17T11:27:28.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T14:20:34.524Z (5 months ago)
- Topics: 2048, 2048-game, cli, golang
- Language: Go
- Size: 57.6 KB
- Stars: 53
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twenty48
[![CircleCI](https://circleci.com/gh/alyyousuf7/twenty48.svg?style=shield)](https://circleci.com/gh/alyyousuf7/twenty48) [![codecov](https://codecov.io/gh/alyyousuf7/twenty48/branch/master/graph/badge.svg)](https://codecov.io/gh/alyyousuf7/twenty48)Play 2048 from CLI
![2048 on CLI](https://user-images.githubusercontent.com/14050128/39704165-f1c7654a-5223-11e8-87fc-66ddc9ae2977.gif)
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.
```bash
$ twenty48 [-width=8] [-height=8]
```## Install
Requires Golang:
```bash
$ go get -u github.com/alyyousuf7/twenty48/cmd/twenty48
```## Development
On host machine with Golang installed:
```bash
$ make test # execute test
$ make binary # build the executable in bin/
```Or using Docker:
```bash
$ 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 textPRs are most welcome!
## License
[MIT](./LICENSE)