2022-07-28 15:18:24 -05:00
|
|
|
// GameState.h
|
|
|
|
#ifndef GAMESTATE_H
|
|
|
|
#define GAMESTATE_H
|
2023-03-12 08:50:50 -05:00
|
|
|
|
2022-08-02 21:17:23 -05:00
|
|
|
#include <SFML\Graphics.hpp>
|
2023-03-12 08:50:50 -05:00
|
|
|
#include "Snake.h"
|
2022-07-28 15:18:24 -05:00
|
|
|
|
|
|
|
class GameState
|
|
|
|
{
|
|
|
|
public:
|
2022-08-02 21:17:23 -05:00
|
|
|
GameState();
|
|
|
|
GameState(int newHorizontal, int newVertical);
|
2023-03-12 08:50:50 -05:00
|
|
|
void StartGame(void);
|
|
|
|
sf::Vector2f GetGameBoundaries(void);
|
2022-07-29 16:27:18 -05:00
|
|
|
/*
|
|
|
|
gameGridHorizontal = (videoSizeHorizontal // 25) * 25;
|
|
|
|
gameGridVertical = (videoSizeVertical // 25) * 25;
|
|
|
|
*/
|
2023-03-12 08:50:50 -05:00
|
|
|
protected:
|
|
|
|
;
|
|
|
|
private:
|
|
|
|
sf::RenderWindow gameWindow;
|
|
|
|
sf::VideoMode gameVideoSettings;
|
|
|
|
SnakeFood playerFood;
|
|
|
|
Snake player;
|
|
|
|
sf::Time delay;
|
|
|
|
void RegenerateFood(void);
|
|
|
|
void RunGameLoop(void);
|
|
|
|
void RenderWindow(void);
|
2022-07-28 15:18:24 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|