snakeplusplus/include/GameState.h

33 lines
654 B
C
Raw Normal View History

// GameState.h
#ifndef GAMESTATE_H
#define GAMESTATE_H
2023-03-12 08:50:50 -05:00
#include <SFML\Graphics.hpp>
2023-03-12 08:50:50 -05:00
#include "Snake.h"
class GameState
{
public:
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);
};
#endif