Remenicent to today's world The Vicious Snake Game challenges the player to survive in an environment filled with consumables. The game will test the player's disipline and strategic movements.
Based on the starter repo for the Capstone project in the Udacity C++ Nanodegree Program. The code for this repo was inspired by this excellent StackOverflow post and set of responses.
- cmake >= 3.7
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- SDL2 >= 2.0
- All installation instructions can be found here
- Note that for Linux, an
apt
orapt-get
installation is preferred to building from source.
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
- Clone this repo.
- Make a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./SnakeGame
.
- The project demonstrates an understanding of C++ functions and control structures.
This is present throughout the code. Functions and control sturctures were used.
- The project reads data from a file and process the data, or the program writes data to a file.
In main.cpp line 22, the game reads the ascii art title from the data folder.
- The project accepts user input and processes the input.
In main.cpp line 46, the game reads user input to to play again.
- The project uses Object Oriented Programming techniques.
The game impliments the class Food.
- Classes use appropriate access specifiers for class members.
The Food class has both public and private variables and functions.
- Class constructors utilize member initialization lists.
The Food class utilizes member initialization lists.
- Classes abstract implementation details from their interfaces.
The Food class abstracts the food operations allowing for more features such as having mutiple food cells in the map.
- Overloaded functions allow the same function to operate on different parameters.
The Food class overloads the foodCell() function line 60 in food.h.