|
Arcade architecture
|
A class that implements the IGameModule interface. More...
#include <arcade_snake.hpp>


Public Member Functions | |
| arcadeSnake () | |
| Constructor for the arcadeSnake class. More... | |
| ~arcadeSnake () | |
| Destructor for the arcadeSnake class. More... | |
Public Member Functions inherited from IGameModule | |
| 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... | |
Private Member Functions | |
| std::size_t | getHighScore () const override |
| Retrieves the high score for the game. More... | |
| std::size_t | getScore () const override |
| Retrieves the current score of the game. More... | |
| void | setScore (std::size_t score) override |
| Sets the score for the game. More... | |
| void | setHighScore (std::size_t highScore) override |
| Sets the high score for the game. More... | |
| std::vector< std::shared_ptr< IEntity > > | getEntities () const override |
| Retrieves a list of entities managed by the class. More... | |
Private Attributes | |
| std::string | _libName = "Arcade Snake" |
| The name of the library. | |
A class that implements the IGameModule interface.
The arcadeSnake class provides an implementation of the IGameModule interface, including methods for initialization, stopping, and retrieving the module name.
| arcadeSnake::arcadeSnake | ( | ) |
Constructor for the arcadeSnake class.
This constructor initializes a new instance of the arcadeSnake class.
| arcadeSnake::~arcadeSnake | ( | ) |
Destructor for the arcadeSnake class.
This destructor cleans up any resources used by the arcadeSnake class.
|
inlineoverrideprivatevirtual |
Retrieves a list of entities managed by the class.
This function overrides the base class implementation and returns a vector of shared pointers to IEntity objects. The returned vector represents the entities currently managed by the class.
Implements IGameModule.
|
inlineoverrideprivatevirtual |
Retrieves the high score for the game.
This function overrides the base class implementation and returns the high score achieved in the game. Currently, it always returns 0.
Implements IGameModule.
|
inlineoverrideprivatevirtual |
Retrieves the current score of the game.
Implements IGameModule.
|
inlineoverrideprivatevirtual |
Sets the high score for the game.
This function overrides the base class implementation to set the high score.
| highScore | The new high score to be set. |
Implements IGameModule.
|
inlineoverrideprivatevirtual |
Sets the score for the game.
| score | The score to be set, represented as a value of type std::size_t. std::size_t is an unsigned integral type typically used for sizes and counts. |
Implements IGameModule.