Interface for game modules.
More...
#include <IGameModule.hpp>
|
|
| IGameModule ()=default |
| | Default constructor.
|
| |
|
virtual | ~IGameModule ()=default |
| | Virtual destructor.
|
| |
| virtual std::size_t | getHighScore () const =0 |
| | Get the high score of the game. More...
|
| |
| virtual void | setHighScore (std::size_t highScore)=0 |
| | Set the high score of the game. More...
|
| |
| virtual std::size_t | getScore () const =0 |
| | Get the current score of the game. More...
|
| |
| virtual void | setScore (std::size_t score)=0 |
| | Set the current score of the game. More...
|
| |
| virtual std::vector< std::shared_ptr< IEntity > > | getEntities () const =0 |
| | Get the list of entities in the game. More...
|
| |
Interface for game modules.
The IGameModule interface defines the structure and behavior of a game module. It includes methods for retrieving and setting scores, as well as accessing game entities.
◆ getEntities()
| virtual std::vector< std::shared_ptr< IEntity > > IGameModule::getEntities |
( |
| ) |
const |
|
pure virtual |
Get the list of entities in the game.
- Returns
- A vector of shared pointers to IEntity objects.
Implemented in arcadeSnake.
◆ getHighScore()
| virtual std::size_t IGameModule::getHighScore |
( |
| ) |
const |
|
pure virtual |
Get the high score of the game.
- Returns
- The high score as a size_t.
Implemented in arcadeSnake.
◆ getScore()
| virtual std::size_t IGameModule::getScore |
( |
| ) |
const |
|
pure virtual |
Get the current score of the game.
- Returns
- The current score as a size_t.
Implemented in arcadeSnake.
◆ setHighScore()
| virtual void IGameModule::setHighScore |
( |
std::size_t |
highScore | ) |
|
|
pure virtual |
Set the high score of the game.
- Parameters
-
| highScore | The new high score to set. |
Implemented in arcadeSnake.
◆ setScore()
| virtual void IGameModule::setScore |
( |
std::size_t |
score | ) |
|
|
pure virtual |
Set the current score of the game.
- Parameters
-
| score | The new score to set. |
Implemented in arcadeSnake.
The documentation for this class was generated from the following file: