MIT License

项目介绍

tiehuis/2048-cli 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 MIT License 许可证,目前获得 270 个 Star、71 次 Fork。

仓库全名
tiehuis/2048-cli
开源许可证
MIT License
Star 数
270
Fork 数
71
未关闭 Issue
10

README 摘要

2048-cli A cli version/engine of the game 2048= for your Linux terminal. There currently are 2 versions that can be run. This includes a straight-forward terminal based version and one using ncurses. To add a new graphical interface, simply create a .c file which implements all the functions in gfx.h and add a Makefile entry. Get git clone https://github.com/tiehuis/2048-cli.git make By default, termios.h is…

完整内容见 GitHub 原始 README 或本页 。

常见问题

2048-cli 用什么语言开发?

主要使用 C 编写,采用 MIT License 许可证,目前有 270 个 Star。

2048-cli 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 2048-cli 的源码?

可以直接克隆仓库:git clone https://github.com/tiehuis/2048-cli.git,默认分支为 master;安装与运行步骤见仓库 README。

2048-cli 最近还在维护吗?

仓库最近一次更新为 2024年1月31日,当前有 10 个未关闭 Issue;Star 数为 270,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

The game 2048 for your Linux terminal (https://github.com/gabrielecirulli/2048)

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
413
价值分
182
活跃状态
归档

语言占比

C
Makefile

Release

README

2048-cli

run on repl.it

A cli version/engine of the game 2048= for your Linux terminal.

Screenshot

There currently are 2 versions that can be run. This includes a straight-forward terminal based version and one using ncurses. To add a new graphical interface, simply create a .c file which implements all the functions in gfx.h and add a Makefile entry.

Get

git clone https://github.com/tiehuis/2048-cli.git
make

By default, termios.h is expected to be present for the standard terminal version, and a VT100 compatible terminal is being used. If a VT100 terminal is not available, simply alter the makefile and remove the ‘-DVT100’ flag. Compiling with ncurses requires the development libraries for it.

On an ubuntu/debian machine for example, these can be obtained via

apt-get install libncurses5-dev

You can also also easily install this on el >= 5 (CentOS, RedHat Enterprise Linux, Scientific Linux, Oracle) and Fedora >= 19 using the package-manager:

sudo yum install 2048-cli[-nocurses]

For el you will need to have the EPEL-repository enabled.

Controls

hjkl and wasd  Default movement keys
q              Quit the current game

Options

-h             Print the program usage.
-H             Print the current highscore.
-C             Disable color support (default).
-c             Enable color support if supported.
-a             Enable animations (default).
-A             Disable animations.
-i             Enable ai without displaying game.
-I             Enable ai and display game.
-r             Reset highscore. Will prompt user.
-s SIZE        Set the size of the playing field.
-b RATE        Set the rate at which blocks spawn per turn.

License

This code is licensed under the MIT License.

评论

暂无评论