Skip to content

leimao/Console-Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console Snake

Lei Mao

Introduction

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.

Dependencies

Installation

Installation of Dependencies

$ sudo apt-get install libncurses-dev cmake

Installation of the Game

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

Usages

Playing the Game Using Default BGM

$ cd bin/
$ ./main

Playing the Game Using Custom BGM

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.

Demo

Notice

If you have encountered any bug, or have any suggestions to improve, please open an issue in the repository.

References

To-Do List

  • Add record board
  • Add background music

Releases

No releases published

Packages

No packages published