Issues to fix: sfml window and bounds checking
This commit is contained in:
+2
-2
@@ -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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user