Skip to content

l0g1c-80m8/snake-plus-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake++ Game

The code for this repo was inspired by this excellent StackOverflow post and set of responses.

snake game demo run

Watch the video

Game Rules

  1. Collecting the apples increases the score and speeds up the snake.
  2. Collecting lightning speeds up the snake.
  3. Collecting the yellow slow/caution diamond will slow down the snake.
  4. Collecting poision bottle or colliding into the body will lead to the game ending.

Changing the Game Config

Change the numbers in the game-config.txt file to change the game config.

  1. First line contains config for the number of poison bottles on the grid.
  2. Second line contains config for the number of yellow slowdown/caution diamonds on the grid.
  3. Third line contains config for the number of lightning speedups on the grid.
  4. Finally, the last line contains config for the number of apples on the grid.

Dependencies for Running Locally

Basic Build Instructions

  1. Execute the build script with ./build.sh to build the project.
  2. To run execute the ./run.sh script. The run script can be executed without the build script as well.

Alternatively, follow the below procedure:

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./SnakeGame.

About

A simple snake game in c++ with twists

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published