This class is used to represent cells in GameGrid in BRIDGES. It is part of the GameAPI. Each cell has a foreground color, background color, and a symbol shape.
- See also
- See the tutorial on making games in BRIDGES: https://bridgesuncc.github.io/tutorials/NonBlockingGame.html
- Author
- David Burlinson
- Date
- 9/06/18
◆ GameCell() [1/2]
bridges.base.GameCell.GameCell |
( |
| ) |
|
◆ GameCell() [2/2]
Constructor with all arguments specified
- Parameters
-
bg,fg | - background, foreground Colors from the NamedColor enum |
symbol | - symbol index from range 0-255 |
◆ getBGByte()
byte bridges.base.GameCell.getBGByte |
( |
| ) |
|
Get background color as a byte.
- Returns
- background color as byte (index of value in NamedColor)
◆ getBGColor()
Get the background color of cell.
- Returns
- background color
◆ getFGByte()
byte bridges.base.GameCell.getFGByte |
( |
| ) |
|
Get foreground color as a byte.
- Returns
- foreground color as byte (index of value in NamedColor)
◆ getFGColor()
Get the foreground color of cell.
- Returns
- object color
◆ getSymbol()
Get the cell symbol.
- Returns
- symbol
◆ getSymbolByte()
byte bridges.base.GameCell.getSymbolByte |
( |
| ) |
|
Get symbol as a byte.
- Returns
- symbol as byte
◆ setBGColor() [1/2]
void bridges.base.GameCell.setBGColor |
( |
NamedColor |
bg | ) |
|
Set background color using NamedColor Enum argument
- Parameters
-
◆ 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
-
◆ 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
-
◆ setSymbol() [2/2]
Set symbol using int argument
- Parameters
-
◆ fg
◆ symbolArray
NamedSymbol [] bridges.base.GameCell.symbolArray = NamedSymbol.values() |
|
staticprotected |
The documentation for this class was generated from the following file:
- /home/erik/work/bridges/bridges-java/src/main/java/bridges/base/GameCell.java