Code Monkey home page Code Monkey logo

sea-snake's Introduction

Sea-Snake

Sea-Snake is a command-line implementation of the classic game "snake" written in C++ using the ncurses library, the name is a play on the language name as it was created as approachable project for me to start to learn C++.

It should compile with no issue on linux and mac assuming you have g++, cmake and ncurses installed, releases marked with "Cygwin Compatible" i was able to compile on windows using Cygwin, but since it's dependent on cygwin1.dll i do not (yet) provide windows executables in the releases, alternatively, on windows you can build and run it in WSL2.

build instructions:

Ensure you have g++, cmake, and ncurses installed:

Linux:

sudo apt-get install g++ cmake libncurses-dev # Ubuntu
apk add make cmake g++ ncurses-dev            # Alpine (run as root or sudo)

if you use a different linux distro, your package manager probably has the same packages under the same or similar names, if not, you can find, build, and install them yourself.

MacOS:

if you have the Xcode command line utils installed there's a decent chance you already have the necessary tools and libraries, otherwise you can install them by hand, or with a 3rd party package manager such as Homebrew:

brew install g++ cmake ncurses

Then download or clone the code, (downloding the latest release is recomended) and compile with cmake:

# from .../sea-snake
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
make

if your ncurses doesn't support unicode, you can compile without unicode using by adding the NO_UNICODE option to your cmake, like so:

cmake -D CMAKE_BUILD_TYPE=Release -D NO_UNICODE=ON ..

once it has compiled you can run it with:

./sea-snake

adding the -u and/or -c will use unicode and/or color respectively, you can also do -h for a full list of options.

(the -u option will not be available if you compiled without unicode)

credits:

This project uses TCLAP (licensed under MIT) for command line parsing.

disclaimer:

I have no association with Cygwin, Microsoft (WSL2), Homebrew, TCLAP, or their respective maintainers.

sea-snake's People

Contributors

ex-32 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.