https://github.com/abhyudayasharma/snake
A Snake game made in C using libncurses
https://github.com/abhyudayasharma/snake
c game linux macos ncurses snake-game windows
Last synced: 3 months ago
JSON representation
A Snake game made in C using libncurses
- Host: GitHub
- URL: https://github.com/abhyudayasharma/snake
- Owner: AbhyudayaSharma
- License: mit
- Created: 2018-08-02T16:45:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-24T07:22:53.000Z (almost 7 years ago)
- Last Synced: 2025-04-04T06:43:46.453Z (over 1 year ago)
- Topics: c, game, linux, macos, ncurses, snake-game, windows
- Language: C
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snake
[](https://travis-ci.com/AbhyudayaSharma/Snake)
[](https://lgtm.com/projects/g/AbhyudayaSharma/Snake/context:cpp)
A Snake game made in C using libncurses
For Windows, the executable is built inside the Debug or the Release folder, depending on the configuration chosen while building through Visual Studio. The executable is called game on Linux and macOS.
**Note**: PDCurses submodule is required to build on Windows but is NOT required for Linux and macOS. However, Xcode is required on macOS. On Linux, it required to install the ncurses package for your distro.
## Building on Linux
1. Install libncurses
- For Debian based distros: apt-get install libncurses5-dev
- For Fedora: yum install ncurses-devel
- For OpenSUSE: zypper in ncurses-devel
2. Clone the repository
3. Run make
4. Run the executable game
## Building on macOS
1. Download Xcode from Apple Store
2. Run xcode-select --install
3. Clone the repository and cd into the cloned folder
4. Run make
Run make clean to remove compiled files
## Building on Windows with Visual Studio 2017
1. Clone the repository with --recurse-submodules flag.
2. Navigate to PDCurses\wincon and run nmake -f Makefile.vc using the Developer Command Prompt.
3. Open the Snake.sln with Visual Studio. Select x86 Debug or Release and click on the run button.
We are able to to make only 32-bit binaries as PDCurses currently provides only a 32 bit library.