Arcade architecture
IGameModule Class Referenceabstract

Interface for game modules. More...

#include <IGameModule.hpp>

Inheritance diagram for IGameModule:

Public Member Functions

 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...
 

Detailed Description

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.

Member Function Documentation

◆ 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
highScoreThe 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
scoreThe new score to set.

Implemented in arcadeSnake.


The documentation for this class was generated from the following file: