Options
All
  • Public
  • Public/Protected
  • All
Menu

Maintains the state of the game. Here is an example flow:

const engine = new GameEngine(gameData)
engine.setLevel(0)
engine.pressRight()
engine.tick()
engine.tick()
engine.pressUp()
engine.tick()
engine.pressUndo()
engine.tick()

Hierarchy

  • GameEngine

Index

Constructors

constructor

Methods

getCurrentLevel

getCurrentLevelCells

  • getCurrentLevelCells(): Cell[][]

getCurrentLevelNum

  • getCurrentLevelNum(): number

getGameData

hasAgain

  • hasAgain(): boolean

isCurrentLevelAMessage

  • isCurrentLevelAMessage(): boolean

loadSnapshotFromJSON

on

press

saveSnapshotToJSON

setLevel

  • setLevel(levelNum: number): void
  • Parameters

    • levelNum: number

    Returns void

tick

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc