Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Properties | List of all members
bridges.game_cell.GameCell Class Reference

This class is used to represent cells in GameGrids in BRIDGES. More...

Public Member Functions

 __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.
 

Protected Attributes

 _bg
 
 _fg
 
 _symbol
 

Properties

 bg = property
 Getter for the background color.
 
 fg = property
 Getter for the foreground color.
 
 symbol = property
 Getter for the symbol in the cell.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

bridges.game_cell.GameCell.__init__ (   self,
**  kwargs 
)

Constructor for the cell of a gamegrid.

Parameters
0background color from enum named_colors
1foreground color from enum named_colors
2the symbol in the cell from named_symbols
Returns
None

Member Function Documentation

◆ 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

Member Data Documentation

◆ _bg

bridges.game_cell.GameCell._bg
protected

◆ _fg

bridges.game_cell.GameCell._fg
protected

◆ _symbol

bridges.game_cell.GameCell._symbol
protected

Property Documentation

◆ 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: