Bridges-C++  3.4.4
Bridges(C++ API)
Public Member Functions | List of all members
bridges::game::GameCell Class Reference

#include <GameGrid.h>

Detailed Description

This class represents a single cell of the Game Grid.

This class is part of the Bridges Game API Each cell of the game grid contains background and foreground colors, and a symbol. Refer to the NamedColor and NamedSymbol definitions for a list of colors and symbols that can be used.

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

Public Member Functions

 GameCell ()
 constructor More...
 
 GameCell (NamedColor bg, NamedColor fg, NamedSymbol symbol)
 
void setBGColor (NamedColor bg)
 Set background color using NamedColor Enum argument. More...
 
void setFGColor (NamedColor fg)
 Set foreground color using NamedColor Enum argument. More...
 
void setSymbol (NamedSymbol s)
 Set symbol using int argument. More...
 
NamedColor getBGColor () const
 Get background color of cell. More...
 
NamedColor getFGColor () const
 Get foreground color of cell. More...
 
NamedSymbol getSymbol () const
 Get cell symbol. More...
 

Constructor & Destructor Documentation

◆ GameCell() [1/2]

bridges::game::GameCell::GameCell ( )
inline

constructor

◆ GameCell() [2/2]

bridges::game::GameCell::GameCell ( NamedColor  bg,
NamedColor  fg,
NamedSymbol  symbol 
)
inline

constructor

Parameters
bgbackground color
fgforeground color
symbolsymbol a this cell

Member Function Documentation

◆ getBGColor()

NamedColor bridges::game::GameCell::getBGColor ( ) const
inline

Get background color of cell.

Returns
background color of cell

◆ getFGColor()

NamedColor bridges::game::GameCell::getFGColor ( ) const
inline

Get foreground color of cell.

Returns
foreground color of cell

◆ getSymbol()

NamedSymbol bridges::game::GameCell::getSymbol ( ) const
inline

Get cell symbol.

Returns
symbol at this cell

◆ setBGColor()

void bridges::game::GameCell::setBGColor ( NamedColor  bg)
inline

Set background color using NamedColor Enum argument.

Parameters
bg- Named Color from the NamedColor enum

◆ setFGColor()

void bridges::game::GameCell::setFGColor ( NamedColor  fg)
inline

Set foreground color using NamedColor Enum argument.

Parameters
fg- Named Color from the NamedColor enum

◆ setSymbol()

void bridges::game::GameCell::setSymbol ( NamedSymbol  s)
inline

Set symbol using int argument.

Parameters
s- Named symbol

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