baba-is-auto
C++17 Baba Is You simulator
Loading...
Searching...
No Matches
baba_is_auto::Game Class Reference

Game class. More...

#include <Game.hpp>

Public Member Functions

 Game (std::string_view filename)
 
void Reset ()
 Resets map and rule data.
 
MapGetMap ()
 
const MapGetMap () const
 
RuleManagerGetRuleManager ()
 
PlayState GetPlayState () const
 
ObjectType GetPlayerIcon () const
 
void MovePlayer (Direction dir)
 

Detailed Description

Game class.

This class represents game. A game is a structured form of Baba Is You.

Constructor & Destructor Documentation

◆ Game()

baba_is_auto::Game::Game ( std::string_view  filename)
explicit

Constructs game with given mapFileName.

Parameters
filenameThe file name to load a map.

Member Function Documentation

◆ GetMap() [1/2]

Map & baba_is_auto::Game::GetMap ( )

Gets a map object.

Returns
A map object.

◆ GetMap() [2/2]

const Map & baba_is_auto::Game::GetMap ( ) const

Gets a map object.

Returns
A map object.

◆ GetPlayerIcon()

ObjectType baba_is_auto::Game::GetPlayerIcon ( ) const

Gets an icon type that represents player.

Returns
An icon type that represents player.

◆ GetPlayState()

PlayState baba_is_auto::Game::GetPlayState ( ) const

Gets the play state of the game.

Returns
The play state of the game.

◆ GetRuleManager()

RuleManager & baba_is_auto::Game::GetRuleManager ( )

Gets a rule manager object.

Returns
A rule manager object.

◆ MovePlayer()

void baba_is_auto::Game::MovePlayer ( Direction  dir)

Moves the icon that represents player.

Parameters
dirThe direction to move the player.

◆ Reset()

void baba_is_auto::Game::Reset ( )

Resets map and rule data.


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