### Hierarchy

- BaseUI
  - TerminalUI
  - TableUI

## Index

### Constructors

- constructor

### Properties

- PIXEL_HEIGHT
- PIXEL_WIDTH
- SPRITE_HEIGHT
- SPRITE_WIDTH
- engine
- gameData
- hasVisualUi
- isDumpingScreen
- renderedPixels
- windowOffsetColStart
- windowOffsetHeight
- windowOffsetRowStart
- windowOffsetWidth

### Methods

- cellPosToXY
- checkIfCellCanBeDrawnOnScreen
- clearScreen
- createMessageSprites
- createMessageTextScreen
- debugRenderScreen
- destroy
- drawCells
- drawCellsAfterRecentering
- getCurrentLevelCells
- getGameData
- getMaxSize
- getPixelsForCell
- hasAgainThatNeedsToRun
- press
- pressAction
- pressDown
- pressLeft
- pressRestart
- pressRight
- pressUndo
- pressUp
- renderLevelScreen
- renderMessageScreen
- renderScreen
- setGame
- setGameEngine
- setLevel
- setPixel
- tick

## Constructors

### constructor

- new BaseUI(): BaseUI

- - Defined in ui/base.ts:100

  #### Returns BaseUI

## Properties

### PIXEL_HEIGHT

PIXEL_HEIGHT: number

- Defined in ui/base.ts:87

### PIXEL_WIDTH

PIXEL_WIDTH: number

- Defined in ui/base.ts:86

### Protected SPRITE_HEIGHT

SPRITE_HEIGHT: number

- Defined in ui/base.ts:97

### Protected SPRITE_WIDTH

SPRITE_WIDTH: number

- Defined in ui/base.ts:96

### Protected engine

engine: Optional<GameEngine>

- Defined in ui/base.ts:89

### Protected gameData

gameData: Optional<GameData>

- Defined in ui/base.ts:88

### Protected hasVisualUi

hasVisualUi: boolean

- Defined in ui/base.ts:98

### Protected isDumpingScreen

isDumpingScreen: boolean

- Defined in ui/base.ts:95

### Protected renderedPixels

renderedPixels: Array<Array<object>>

- Defined in ui/base.ts:90

### Protected windowOffsetColStart

windowOffsetColStart: number

- Defined in ui/base.ts:91

### Protected windowOffsetHeight

windowOffsetHeight: Optional<number>

- Defined in ui/base.ts:94

### Protected windowOffsetRowStart

windowOffsetRowStart: number

- Defined in ui/base.ts:92

### Protected windowOffsetWidth

windowOffsetWidth: Optional<number>

- Defined in ui/base.ts:93

## Methods

### Protected cellPosToXY

- cellPosToXY(cell: Cell): object

- - Defined in ui/base.ts:431

  #### Parameters

  - ##### cell: Cell

  #### Returns object

  - ##### cellStartX: number

  - ##### cellStartY: number

  - ##### isOnScreen: boolean

### Protected Abstract checkIfCellCanBeDrawnOnScreen

- checkIfCellCanBeDrawnOnScreen(cellStartX: number, cellStartY: number): boolean

- - Defined in ui/base.ts:429

  #### Parameters

  - ##### cellStartX: number

  - ##### cellStartY: number

  #### Returns boolean

### Protected clearScreen

- clearScreen(): void

- - Defined in ui/base.ts:480

  #### Returns void

### Protected createMessageSprites

- createMessageSprites(messageStr: string): Set<GameSprite>[][]

- - Defined in ui/base.ts:403

  #### Parameters

  - ##### messageStr: string

  #### Returns Set<GameSprite>[][]

### Protected createMessageTextScreen

- createMessageTextScreen(messageStr: string): string[]

- - Defined in ui/base.ts:332

  #### Parameters

  - ##### messageStr: string

  #### Returns string[]

### debugRenderScreen

- debugRenderScreen(): void

- - Defined in ui/base.ts:243

  #### Returns void

### destroy

- destroy(): void

- - Defined in ui/base.ts:123

  #### Returns void

### drawCells

- drawCells(cells: Iterable<Cell>, dontRestoreCursor: boolean, renderScreenDepth?: number): void

- - Defined in ui/base.ts:301

  #### Parameters

  - ##### cells: Iterable<Cell>

  - ##### dontRestoreCursor: boolean

  - ##### Default value renderScreenDepth: number = 0

  #### Returns void

### Protected Abstract drawCellsAfterRecentering

- drawCellsAfterRecentering(cells: Iterable<Cell>, renderScreenDepth: number): void

- - Defined in ui/base.ts:461

  #### Parameters

  - ##### cells: Iterable<Cell>

  - ##### renderScreenDepth: number

  #### Returns void

### getCurrentLevelCells

- getCurrentLevelCells(): Cell[][]

- - Defined in ui/base.ts:209

  #### Returns Cell[][]

### getGameData

- getGameData(): GameData

- - Defined in ui/base.ts:167

  #### Returns GameData

### Protected Abstract getMaxSize

- getMaxSize(): object

- - Defined in ui/base.ts:459

  #### Returns object

  - ##### columns: number

  - ##### rows: number

### Protected getPixelsForCell

- getPixelsForCell(cell: Cell): IColor[][]

- - Defined in ui/base.ts:463

  #### Parameters

  - ##### cell: Cell

  #### Returns IColor[][]

### Protected hasAgainThatNeedsToRun

- hasAgainThatNeedsToRun(): boolean

- - Defined in ui/base.ts:484

  #### Returns boolean

### press

- press(dir: RULE_DIRECTION): void

- - Defined in ui/base.ts:174

  #### Parameters

  - ##### dir: RULE_DIRECTION

  #### Returns void

### pressAction

- pressAction(): void

- - Defined in ui/base.ts:191

  #### Returns void

### pressDown

- pressDown(): void

- - Defined in ui/base.ts:182

  #### Returns void

### pressLeft

- pressLeft(): void

- - Defined in ui/base.ts:185

  #### Returns void

### pressRestart

- pressRestart(): void

- - Defined in ui/base.ts:199

  #### Returns void

### pressRight

- pressRight(): void

- - Defined in ui/base.ts:188

  #### Returns void

### pressUndo

- pressUndo(): void

- - Defined in ui/base.ts:194

  #### Returns void

### pressUp

- pressUp(): void

- - Defined in ui/base.ts:179

  #### Returns void

### Protected Abstract renderLevelScreen

- renderLevelScreen(levelRows: Cell[][], renderScreenDepth: number): void

- - Defined in ui/base.ts:425

  #### Parameters

  - ##### levelRows: Cell[][]

  - ##### renderScreenDepth: number

  #### Returns void

### renderMessageScreen

- renderMessageScreen(message: string): void

- - Defined in ui/base.ts:249

  #### Parameters

  - ##### message: string

  #### Returns void

### renderScreen

- renderScreen(clearCaches: boolean, renderScreenDepth?: number): void

- - Defined in ui/base.ts:276

  #### Parameters

  - ##### clearCaches: boolean

  - ##### Default value renderScreenDepth: number = 0

  #### Returns void

### setGame

- setGame(gameData: string): void

- - Defined in ui/base.ts:160

  #### Parameters

  - ##### gameData: string

  #### Returns void

### setGameEngine

- setGameEngine(engine: GameEngine): void

- - Defined in ui/base.ts:129

  #### Parameters

  - ##### engine: GameEngine

  #### Returns void

### setLevel

- setLevel(levelNum: number): void

- - Defined in ui/base.ts:204

  #### Parameters

  - ##### levelNum: number

  #### Returns void

### Protected Abstract setPixel

- setPixel(x: number, y: number, hex: string, fgHex: Optional<string>, chars: string): void

- - Defined in ui/base.ts:427

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### hex: string

  - ##### fgHex: Optional<string>

  - ##### chars: string

  #### Returns void

### tick

- tick(): ITickResult

- - Defined in ui/base.ts:216

  #### Returns ITickResult

Generated using TypeDoc