Sokoban
Public Member Functions | Public Attributes | List of all members
GameState Struct Reference

Structure representing Sokoban game state. More...

#include <State.h>

Inheritance diagram for GameState:
TwoPlayerGameState

Public Member Functions

 GameState ()
 Constructor. More...
 

Public Attributes

int sokoban_x
 
int sokoban_y
 
int barrels_on_target
 
std::vector< std::vector< int > > barrel_grid
 The grid which for every coordinate determines if there is a barrel. More...
 
std::vector< Barrellist_of_barrels
 
std::string hash
 

Detailed Description

Structure representing Sokoban game state.

Constructor & Destructor Documentation

◆ GameState()

GameState::GameState ( )
inline

Constructor.

Sets default values for variables.

Member Data Documentation

◆ barrel_grid

std::vector<std::vector<int> > GameState::barrel_grid

The grid which for every coordinate determines if there is a barrel.

The values of grid may be 0 (no barrel) or <= 1 (index of barrel in the list of barrels + 1).

◆ barrels_on_target

int GameState::barrels_on_target

Number of barrels which lies on target.

◆ hash

std::string GameState::hash

Hash for this game state - for backtracking.

◆ list_of_barrels

std::vector<Barrel> GameState::list_of_barrels

List of barrels which are on map.

◆ sokoban_x

int GameState::sokoban_x

Horizontal position of Sokoban.

◆ sokoban_y

int GameState::sokoban_y

Vertical position of Sokoban.


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