This class is used to represent cells in GameGrids in BRIDGES.
More...
|
| | __init__ (self, **kwargs) |
| | Constructor for the cell of a gamegrid.
|
| |
| | get_bg_byte (self) |
| | Gets the background color as a byte.
|
| |
| | get_fg_byte (self) |
| | Gets the foreground color as a byte.
|
| |
| | get_symbol_byte (self) |
| | Gets the symbol as a byte.
|
| |
|
| | bg = property |
| | Getter for the background color.
|
| |
| | fg = property |
| | Getter for the foreground color.
|
| |
| | symbol = property |
| | Getter for the symbol in the cell.
|
| |
This class is used to represent cells in GameGrids in BRIDGES.
Each cell has a foreground color, background color, and symbol.
- See also
- Refer to the Game tutorial at
https://bridgesuncc.github.io/tutorials/NonBlockingGame.html
- Author
- David Burlinson, Matthew McQuaigue
- Date
- 9/06/18
◆ __init__()
| bridges.game_cell.GameCell.__init__ |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
Constructor for the cell of a gamegrid.
- Parameters
-
| 0 | background color from enum named_colors |
| 1 | foreground color from enum named_colors |
| 2 | the symbol in the cell from named_symbols |
- Returns
-
None
◆ get_bg_byte()
| bridges.game_cell.GameCell.get_bg_byte |
( |
|
self | ) |
|
Gets the background color as a byte.
- Returns
- background color as byte (index of value in NamedColor)
◆ get_fg_byte()
| bridges.game_cell.GameCell.get_fg_byte |
( |
|
self | ) |
|
Gets the foreground color as a byte.
- Returns
- foreground color as byte (index of value in NamedColor)
◆ get_symbol_byte()
| bridges.game_cell.GameCell.get_symbol_byte |
( |
|
self | ) |
|
Gets the symbol as a byte.
- Returns
- symbol as byte
◆ _bg
| bridges.game_cell.GameCell._bg |
|
protected |
◆ _fg
| bridges.game_cell.GameCell._fg |
|
protected |
◆ _symbol
| bridges.game_cell.GameCell._symbol |
|
protected |
◆ bg
| bridges.game_cell.GameCell.bg = property |
|
static |
Getter for the background color.
- Returns
-
color background color
◆ fg
| bridges.game_cell.GameCell.fg = property |
|
static |
Getter for the foreground color.
- Returns
-
color the foreground color
◆ symbol
| bridges.game_cell.GameCell.symbol = property |
|
static |
Getter for the symbol in the cell.
- Returns
-
symbol
The documentation for this class was generated from the following file: