Bridges-Python  3.4.4
Bridges(Python API)
Public Member Functions | List of all members
bridges.game_cell.GameCell Class Reference

Public Member Functions

def __init__ (self, **kwargs)
 Constructor for the cell of a gamegrid. More...
 
def bg (self)
 Getter for the background color. More...
 
def bg (self, color)
 Setter for the background color. More...
 
def fg (self)
 Getter for the foreground color. More...
 
def fg (self, color)
 Setter for the color of the foreground. More...
 
def symbol (self)
 Getter for the symbol in the cell. More...
 
def symbol (self, s)
 Setter for the symbol in the cell. More...
 
def get_bg_byte (self)
 Gets the background color as a byte. More...
 
def get_fg_byte (self)
 Gets the foreground color as a byte. More...
 
def get_symbol_byte (self)
 Gets the symbol as a byte. More...
 

Constructor & Destructor Documentation

◆ __init__()

def 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

◆ 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
colorcolor to be set
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
colorthe 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
sthe symbol to be applied
Returns
None
Exceptions
ValueErrorif the int value for the symbol is < 0 or > 255

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