2022-08-02 21:58:58 -05:00
|
|
|
// SnakeFood.h
|
|
|
|
#ifndef SNAKEFOOD_H
|
|
|
|
#define SNAKEFOOD_H
|
2022-08-21 02:51:33 -05:00
|
|
|
#include <random>
|
2022-08-02 21:58:58 -05:00
|
|
|
#include <SFML\Graphics.hpp>
|
|
|
|
|
|
|
|
class SnakeFood
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
public:
|
|
|
|
sf::RectangleShape snakeFoodObject;
|
2022-08-21 02:51:33 -05:00
|
|
|
std::default_random_engine generator;
|
2022-08-02 21:58:58 -05:00
|
|
|
SnakeFood();
|
|
|
|
SnakeFood(sf::Vector2f snakeFoodSize);
|
2022-08-15 23:51:18 -05:00
|
|
|
void GenerateNewLocation(int horizontalLocation, int verticalLocation);
|
2022-08-21 02:51:33 -05:00
|
|
|
int GenerateRandomNumber(int generationLimit);
|
2022-08-02 21:58:58 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|