This is a class in BRIDGES for representing an (n x n)game grid.
This class is part of the Bridges Game API
- See also
- See the detailed Bridges game tutorial for examples at https://bridgesuncc.github.io/tutorials/NonBlockingGame.html
- Author
- Erik Saule,
- Date
- 2018, 2019, 12/28/20
|
void | setBGColor (int row, int col, NamedColor color) |
|
NamedColor | getBGColor (int row, int col) const |
|
NamedColor | getFGColor (int row, int col) const |
|
NamedSymbol | getSymbol (int row, int col) const |
|
void | setFGColor (int row, int col, NamedColor color) |
|
void | setSymbol (int row, int col, NamedSymbol symbol) |
|
void | drawSymbol (int row, int col, NamedSymbol symbol, NamedColor color) |
|
virtual const string | getDStype () const override |
| Return the data structure type. More...
|
|
| GameGrid (int nbrow=10, int nbcol=10) |
|
| GameGrid (const GameGrid &)=delete |
|
virtual | ~GameGrid ()=default |
|
virtual const string | getDataStructureRepresentation () const override |
|
| Grid (int rows, int cols) |
| Grid constructor. More...
|
|
| Grid () |
|
| Grid (int *size) |
| Grid constructor given size. More...
|
|
| Grid (const Grid &g) |
| Grid constructor given an input grid. More...
|
|
virtual | ~Grid () |
|
Grid & | operator= (const Grid &g) |
|
void | setDimensions (int rows, int cols) |
| Construct the grid given the dimensions. More...
|
|
int const * | getDimensions () |
| Get dimenions of the grid. More...
|
|
GameCell const & | get (int row, int col) const |
| Get the (row, col) element in the grid. More...
|
|
void | set (int row, int col, GameCell val) |
| Set the grid value for the (row, col) element. More...
|
|
BracketHelperConst | operator[] (int row) const |
| provides the necessary abstraction to do something = grid[x][y]; More...
|
|
BracketHelper | operator[] (int row) |
| provides the necessary abstraction to do grid[x][y] = something; More...
|
|
virtual | ~DataStructure ()=default |
|