1#ifndef PACMAN_DIFFICULTY_H
2#define PACMAN_DIFFICULTY_H
3#include <unordered_map>
115 std::unordered_map<int, DifficultySpecs> difficultyMap;
float getFrightenedTime() const
This duration differs on every level and goes up and down.
Definition Difficulty.cpp:66
int getFruitSpriteOffset() const
Retrieves the sprite sheet offset for the fruit associated with the current difficulty level.
Definition Difficulty.cpp:46
void reset()
Resets the difficulty back to 0.
Definition Difficulty.cpp:41
static Difficulty & getInstance()
Returns an instance of the Difficulty class.
Definition Difficulty.cpp:30
int getFlashesh() const
Flashes determine how many warnings the player gets before frightened ghosts turn normal again.
Definition Difficulty.cpp:70
void increaseDifficulty()
Increases the difficulty for as long as it doesn't out~index the difficulty map. Reuses the final dif...
Definition Difficulty.cpp:36
Difficulty(Difficulty &other)=delete
void operator=(const Difficulty &)=delete
float getGhostSpeed() const
The speed of the Ghosts is different on some levels.
Definition Difficulty.cpp:58
float getFrighenedGhostSpeed() const
The speed decrease of the ghosts varies on some levels.
Definition Difficulty.cpp:62
float getPacmanSpeed() const
The speed of Pacman is different on some levels.
Definition Difficulty.cpp:54
int getFruitPoints() const
The point value differs per difficulty level. As per the original game. https://pacman....
Definition Difficulty.cpp:50
Definition Difficulty.h:6
Definition Difficulty.h:13
float frighenedGhostSpeed
Definition Difficulty.h:18
float pacmanSpeed
Definition Difficulty.h:16
int fruitSpriteOffset
Definition Difficulty.h:14
float ghostSpeed
Definition Difficulty.h:17
int fruitPoints
Definition Difficulty.h:15
float frightenedTime
Definition Difficulty.h:19
int flashesh
Definition Difficulty.h:20