commit
8f27c23250
5
.gitignore
vendored
5
.gitignore
vendored
@ -32,3 +32,8 @@
|
|||||||
*.app
|
*.app
|
||||||
*.json
|
*.json
|
||||||
*.ps1
|
*.ps1
|
||||||
|
|
||||||
|
# Extras
|
||||||
|
.vs*
|
||||||
|
build
|
||||||
|
bin
|
14
Makefile
Normal file
14
Makefile
Normal 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)
|
@ -2,6 +2,10 @@
|
|||||||
#ifndef SNAKE_H
|
#ifndef SNAKE_H
|
||||||
#define SNAKE_H
|
#define SNAKE_H
|
||||||
|
|
||||||
|
#include <deque>
|
||||||
|
#include <SFML\Graphics.hpp>
|
||||||
|
#include "SnakeFood.h"
|
||||||
|
|
||||||
sf::Vector2f CalculateNewPosition(int direction, sf::Vector2f position);
|
sf::Vector2f CalculateNewPosition(int direction, sf::Vector2f position);
|
||||||
bool GlobalCollision(sf::Vector2f object1Position, sf::Vector2f object2Position);
|
bool GlobalCollision(sf::Vector2f object1Position, sf::Vector2f object2Position);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user