Bridges-Java-3.0.1  3.0.1
Bridges(JavaAPI)
Public Member Functions | Static Protected Attributes | List of all members
bridges.base.GameCell Class Reference

Detailed Description

This class is used to represent cells in GameGrids in BRIDGES. Each cell has a foreground color, background color, and symbol.

Author
David Burlinson
Date
9/06/18

Public Member Functions

 GameCell ()
 
 GameCell (NamedColor bg, NamedColor fg, NamedSymbol symbol)
 
void setBGColor (NamedColor bg)
 
void setFGColor (NamedColor fg)
 
void setBGColor (String bg)
 
void setFGColor (String fg)
 
void setSymbol (int s)
 
void setSymbol (NamedSymbol s)
 
NamedColor getBGColor ()
 
NamedColor getFGColor ()
 
NamedSymbol getSymbol ()
 
byte getBGByte ()
 
byte getFGByte ()
 
byte getSymbolByte ()
 

Static Protected Attributes

static NamedSymbol [] symbolArray = NamedSymbol.values()
 

Constructor & Destructor Documentation

◆ GameCell() [1/2]

bridges.base.GameCell.GameCell ( )

◆ GameCell() [2/2]

bridges.base.GameCell.GameCell ( NamedColor  bg,
NamedColor  fg,
NamedSymbol  symbol 
)

Constructor with all arguments specified

Parameters
bg,fg- Named Colors from the NamedColor enum
symbol- symbol index from range 0-255

Member Function Documentation

◆ getBGByte()

byte bridges.base.GameCell.getBGByte ( )
Returns
background color as byte (index of value in NamedColor)

◆ getBGColor()

NamedColor bridges.base.GameCell.getBGColor ( )
Returns
background color

◆ getFGByte()

byte bridges.base.GameCell.getFGByte ( )
Returns
foreground color as byte (index of value in NamedColor)

◆ getFGColor()

NamedColor bridges.base.GameCell.getFGColor ( )
Returns
object color

◆ getSymbol()

NamedSymbol bridges.base.GameCell.getSymbol ( )
Returns
symbol

◆ getSymbolByte()

byte bridges.base.GameCell.getSymbolByte ( )
Returns
symbol as byte

◆ setBGColor() [1/2]

void bridges.base.GameCell.setBGColor ( NamedColor  bg)

Set background color using NamedColor Enum argument

Parameters
bg- Named Color from the NamedColor enum

◆ setBGColor() [2/2]

void bridges.base.GameCell.setBGColor ( String  bg)

Set background color using String argument

Parameters
bg- String background color

◆ setFGColor() [1/2]

void bridges.base.GameCell.setFGColor ( NamedColor  fg)

Set foreground color using NamedColor Enum argument

Parameters
fg- Named Color from the NamedColor enum

◆ setFGColor() [2/2]

void bridges.base.GameCell.setFGColor ( String  fg)

Set foreground color using String argument

Parameters
fg- String foreground color

◆ setSymbol() [1/2]

void bridges.base.GameCell.setSymbol ( int  s)

Set symbol using int argument

Parameters
s- Integer symbol index

◆ setSymbol() [2/2]

void bridges.base.GameCell.setSymbol ( NamedSymbol  s)

Set symbol using int argument

Parameters
s- Named symbol

Member Data Documentation

◆ symbolArray

NamedSymbol [] bridges.base.GameCell.symbolArray = NamedSymbol.values()
staticprotected

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