pacman/lib/include/GameState.hpp
Corentin Jabot c495dd9c37 Basic fruits support
Of course, there is no support for levels yet!
2021-09-13 14:48:59 +02:00

42 lines
795 B
C++

#pragma once
#include "Blinky.hpp"
#include "Clyde.hpp"
#include "Ghost.hpp"
#include "Inky.hpp"
#include "PacMan.hpp"
#include "Pellets.hpp"
#include "Pinky.hpp"
#include "Score.hpp"
#include "SuperPellets.hpp"
#include "Fruits.hpp"
#include "InputState.hpp"
namespace pacman {
struct GameState {
void step(std::chrono::milliseconds delta);
Blinky blinky;
Pinky pinky;
Inky inky;
Clyde clyde;
PacMan pacMan;
InputState inputState;
Pellets pellets;
SuperPellets superPellets;
Fruits fruit;
Score score;
std::chrono::milliseconds timeSinceDeath{};
void checkCollision(Ghost & ghost);
void handleDeathAnimation(std::chrono::milliseconds delta);
void eatPellets();
void eatFruit();
void killPacMan();
bool isPacManDying() const;
};
} // namespace pacman