◆ __init__()
def 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
◆ bg() [1/2]
def bridges.game_cell.GameCell.bg |
( |
|
self | ) |
|
Getter for the background color.
- Returns
-
color background color
◆ bg() [2/2]
def bridges.game_cell.GameCell.bg |
( |
|
self, |
|
|
|
color |
|
) |
| |
Setter for the background color.
- Parameters
-
- Returns
-
None
◆ fg() [1/2]
def bridges.game_cell.GameCell.fg |
( |
|
self | ) |
|
Getter for the foreground color.
- Returns
-
color the foreground color
◆ fg() [2/2]
def bridges.game_cell.GameCell.fg |
( |
|
self, |
|
|
|
color |
|
) |
| |
Setter for the color of the foreground.
- Parameters
-
color | the color to be applied |
- Returns
-
None
◆ get_bg_byte()
def 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()
def 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()
def bridges.game_cell.GameCell.get_symbol_byte |
( |
|
self | ) |
|
Gets the symbol as a byte.
- Returns
- symbol as byte
◆ symbol() [1/2]
def bridges.game_cell.GameCell.symbol |
( |
|
self | ) |
|
Getter for the symbol in the cell.
- Returns
-
symbol
◆ symbol() [2/2]
def bridges.game_cell.GameCell.symbol |
( |
|
self, |
|
|
|
s |
|
) |
| |
Setter for the symbol in the cell.
- Parameters
-
s | the symbol to be applied |
- Returns
-
None
- Exceptions
-
ValueError | if the int value for the symbol is < 0 or > 255 |
The documentation for this class was generated from the following file: