Lei Mao
The Console Snake game with background music was implemented using C++ and the libraries libncurses
and libcplayer
. libncurses
(new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces in a terminal-independent manner. libcplayer
(console player) is a C++ library for playing background sound asynchronously in C++ programs.
- CMake 3.0.0+
- libncurses 6.1+
- libcplayer 0.0.1
$ sudo apt-get install libncurses-dev cmake
Because the installation requires to use git submodule
, please git clone
instead of download
the repository.
$ git clone https://github.com/leimao/Console_Snake.git
$ cd Console_Snake
$ git submodule update --init --recursive
$ mkdir -p build
$ cd build
$ cmake ..
$ make
$ make install
$ cd bin/
$ ./main
The user is also allowed to use custom BGMs.
$ cd bin/
$ ./main [bgm_sound_file]
Currently the game only supports wav
, ogg
, and flac
audio formats.
If you have encountered any bug, or have any suggestions to improve, please open an issue in the repository.
- Add record board
- Add background music