Merge pull request #14 from TriantaTV/development

Development
This commit is contained in:
TriantaTV 2023-02-26 18:28:29 -06:00 committed by GitHub
commit 8f27c23250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 0 deletions

5
.gitignore vendored
View File

@ -32,3 +32,8 @@
*.app
*.json
*.ps1
# Extras
.vs*
build
bin

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
INC := -I include
STD := -std=c++11
SFML := -lsfml-graphics -lsfml-window -lsfml-system
all: compile link
compile:
g++ $(INC) $(STD) -c -o build/main.o src/main.cpp
g++ $(INC) $(STD) -c -o build/GameState.o src/GameState.cpp
g++ $(INC) $(STD) -c -o build/Snake.o src/Snake.cpp
g++ $(INC) $(STD) -c -o build/SnakeFood.o src/SnakeFood.cpp
link:
g++ build/*.o -o bin/SnakePlusPlus.out $(SFML)

View File

@ -2,6 +2,10 @@
#ifndef SNAKE_H
#define SNAKE_H
#include <deque>
#include <SFML\Graphics.hpp>
#include "SnakeFood.h"
sf::Vector2f CalculateNewPosition(int direction, sf::Vector2f position);
bool GlobalCollision(sf::Vector2f object1Position, sf::Vector2f object2Position);