Symbol

Symbol

An immutable visual representation of a piece on the board.

Boards are marked as either "outside" (sunlit, natural colors) or "underground" (dark, roguelike terminal palette). The symbol carries separate color/background pairs for each mode.

Symbols are layered: terrain → items → effects → agent. The top-most non-null color and background values win for each cell.

Constructor

new Symbol(entity, color, background, outsideColor, outsideBackground)

Source:
Parameters:
Name Type Description
entity string

HTML entity / character to display

color Color | null

Underground foreground color (null = inherit)

background Color | null

Underground background color (null = inherit)

outsideColor Color | null

Outside foreground color (null = same as color)

outsideBackground Color | null

Outside background color (null = same as background)

Classes

Symbol

Methods

getBackground()

Description:
  • Background Color for the given lighting mode. @returns {Color|null}

Source:

getColor()

Description:
  • Foreground Color for the given lighting mode. @returns {Color|null}

Source: