GithubHelp home page GithubHelp logo

onofretzk / snaze Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 456 KB

Classic arcade snake game simulator in a maze

License: GNU General Public License v3.0

CMake 0.97% C++ 99.03%
tremaux pathfinder-algorithm maze-solver snake-game maze game-loop

snaze's Introduction

A Snake Trapped in a Maze

About the project

Run the classic snake game inside a maze! The challenge? Provide to snake the correct direction to the pellet. The path finder algorithm used here is Trémaux's without graph theory( maybe one day )

Game Rules

  1. The snake has 5 lives.

  2. The snake moves by extending its head 1 step in the direction it’s moving and pulling its tail in.

  3. If the snake eats a piece of food, its length grows by one and a new food pellet is randomly placed in a location the snake can get to.

  4. There might be one or more levels, depending on the input file.

  5. Everytime the snake crashes into itself or into a wall it looses one life; The snake loses the game simulation when all 5 lives are spent.

  6. The snake wins the game simulation if it eats all the food pellets in all levels.

Compile and Run

Downloading:

$ git clone https://github.com/OnofreTZK/Snaze.git

In root:

$ cmake -S . -Bbuild && cd build

$ make

To run:

$ ./gsnake [<mazeConfigfile.dat>]

Check available mazes in /data

Example of expected end game output:

Authorship

snaze's People

Contributors

onofretzk avatar

Stargazers

 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.