Issues to fix: sfml window and bounds checking

This commit is contained in:
2023-03-17 21:40:49 -05:00
parent c4d40d152b
commit 67e56bcb3c
6 changed files with 38 additions and 9 deletions
+2 -2
View File
@@ -17,6 +17,7 @@ public:
virtual void StartGameWindow(void) = 0;
protected:
bool isWindowAlive;
sf::Time delay = sf::milliseconds(75);
private:
;
};
@@ -32,7 +33,7 @@ public:
protected:
;
private:
;
void Clear(void);
};
class SFML : public DisplayInterface
@@ -51,7 +52,6 @@ private:
void DrawEmpty(sf::Vector2f location);
void DrawFood(sf::Vector2f location);
void DrawSnake(sf::Vector2f location);
sf::Time delay;
sf::RenderWindow gameWindow;
sf::VideoMode gameVideoSettings;
sf::RectangleShape drawObject;
+2 -1
View File
@@ -9,7 +9,8 @@ class SnakeFood
{
public:
SnakeFood();
sf::Vector2f GenerateNewFood(sf::Vector2f boundaries);
void GenerateNewFood(sf::Vector2f boundaries);
sf::Vector2f GetFoodLocation(void);
protected:
;
private: