2020-11-27 13:10:09 +00:00
|
|
|
#ifndef PACMAN_GAME_H
|
|
|
|
#define PACMAN_GAME_H
|
|
|
|
|
2020-11-28 13:10:25 +00:00
|
|
|
#include "Board.hpp"
|
|
|
|
#include "GameWindow.hpp"
|
|
|
|
#include "PacMan.hpp"
|
|
|
|
#include "Pellets.hpp"
|
|
|
|
#include "SuperPellets.hpp"
|
|
|
|
|
|
|
|
class InputState;
|
2020-11-27 13:10:09 +00:00
|
|
|
|
|
|
|
class Game {
|
|
|
|
public:
|
|
|
|
Game();
|
2020-11-27 16:16:42 +00:00
|
|
|
|
2020-11-27 13:10:09 +00:00
|
|
|
void run();
|
|
|
|
|
|
|
|
private:
|
|
|
|
GameWindow window;
|
|
|
|
Board board;
|
2020-11-28 13:10:25 +00:00
|
|
|
PacMan pacMan;
|
|
|
|
Pellets pellets;
|
|
|
|
SuperPellets superPellets;
|
2020-11-27 13:10:09 +00:00
|
|
|
|
2020-11-27 16:16:42 +00:00
|
|
|
static void processEvents(InputState & inputState);
|
|
|
|
|
2020-11-27 13:10:09 +00:00
|
|
|
static void keyToggle(const SDL_Event & event, InputState & inputState, bool on);
|
2020-11-27 16:16:42 +00:00
|
|
|
|
|
|
|
[[nodiscard]] static auto now();
|
2020-11-27 13:10:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //PACMAN_GAME_H
|