From 3c901e5f89653eeffbb31c21b6ec14eb8c475293 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 26 Feb 2023 19:22:28 -0600 Subject: [PATCH 1/3] Adjusted Makefile and added clean up --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 254adca..2507193 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,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 From 805430a090c0a10f8aa6a8ee8172ccea90e7c491 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 26 Feb 2023 19:56:00 -0600 Subject: [PATCH 2/3] Added making directories in Makefile --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2507193..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 From 153b4e136781658b5d6a51648cb96ac736f6b6a6 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 26 Feb 2023 19:56:11 -0600 Subject: [PATCH 3/3] Added a README file --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README.md 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!