diff --git a/Makefile b/Makefile index 254adca..75c1ce8 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,10 @@ INC := -I include STD := -std=c++11 SFML := -lsfml-graphics -lsfml-window -lsfml-system -all: compile link +all: dirs compile link + +dirs: + mkdir bin build compile: g++ $(INC) $(STD) -c -o build/main.o src/main.cpp @@ -11,4 +14,7 @@ compile: g++ $(INC) $(STD) -c -o build/SnakeFood.o src/SnakeFood.cpp link: - g++ build/*.o -o bin/SnakePlusPlus.out $(SFML) \ No newline at end of file + g++ build/*.o -o bin/SnakePlusPlus $(SFML) + +clean: + rm bin/*.o build/*.out \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee5777f --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# SnakePlusPlus +A version of Snake made in C++ and using SFML + +## Controls +----------- + - Use the arrow keys to move the Snake + - Use the escape key to close the game + +## Compiling the game +------------------ + +Prerequisites + - C++11 + - [SFML](https://github.com/SFML/SFML) + +Clone the repository and compile it using: + + git clone https://github.com/TriantaTV/snakeplusplus.git + make + +The game is output into the `bin` folder, simply run the game and enjoy!