snakeplusplus/include/snakefood.h

25 lines
501 B
C
Raw Normal View History

// SnakeFood.h
#ifndef SNAKEFOOD_H
#define SNAKEFOOD_H
2023-03-12 08:50:50 -05:00
#include <SFML/Graphics.hpp>
#include <random>
2023-03-12 08:50:50 -05:00
class SnakeFood
{
public:
SnakeFood();
SnakeFood(sf::Vector2f snakeFoodSize);
2023-03-12 08:50:50 -05:00
void GenerateNewFood(sf::Vector2f windowSize);
sf::RectangleShape GetFoodObject(void);
sf::Vector2f GetFoodObjectPosition(void);
2023-03-12 08:50:50 -05:00
protected:
;
private:
sf::RectangleShape snakeFoodObject;
std::default_random_engine generator;
int GenerateRandomNumber(int generationLimit);
};
#endif