snakeplusplus/include/snake.h

27 lines
418 B
C
Raw Normal View History

// Snake.h
#ifndef SNAKE_H
#define SNAKE_H
2023-03-17 20:13:50 -05:00
#include <queue>
#include <SFML/Graphics.hpp>
class Snake
{
public:
Snake(void);
2023-03-17 20:13:50 -05:00
sf::Vector2f MoveSnake(void);
sf::Vector2f Pop(void);
void UpdateDirection(int newDirection);
2023-03-12 08:50:50 -05:00
protected:
;
private:
2023-03-17 20:13:50 -05:00
std::queue<sf::Vector2f> snakeBody;
2023-03-12 08:50:50 -05:00
int snakeDirection = 0;
2023-03-17 20:13:50 -05:00
sf::Vector2f CalculateNewHead();
void CreateNewHead(sf::Vector2f);
};
#endif