Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Game

Mine resources to obtain more value than your opponent.

Hierarchy

  • BaseGame
    • Game

Implements

  • IBaseGame

Index

Properties

bombPrice

bombPrice: number

The monetary price of a bomb when bought or sold.

bombSize

bombSize: number

The amount of cargo space taken up by a Bomb.

bombs

bombs: Bomb[]

Every Bomb in the game.

buildingMaterialPrice

buildingMaterialPrice: number

The monetary price of building materials when bought.

currentPlayer

currentPlayer: Player

The player whose turn it is currently. That player can send commands. Other players cannot.

currentTurn

currentTurn: number

The current turn number, starting at 0 for the first player's turn.

dirtPrice

dirtPrice: number

The monetary price of dirt when bought or sold.

fallDamage

fallDamage: number

The amount of damage taken per Tile fallen.

fallWeightDamage

fallWeightDamage: number

The amount of extra damage taken for falling while carrying a large amount of cargo.

gameObjects

gameObjects: object

A mapping of every game object's ID to the actual game object. Primarily used by the server and client to easily refer to the game objects via ID.

Type declaration

ladderCost

ladderCost: number

The amount of building material required to build a ladder.

ladderHealth

ladderHealth: number

The amount of mining power needed to remove a ladder from a Tile.

largeCargoSize

largeCargoSize: number

The amount deemed as a large amount of cargo.

largeMaterialSize

largeMaterialSize: number

The amount deemed as a large amount of material.

mapHeight

mapHeight: number

The number of Tiles in the map along the y (vertical) axis.

mapWidth

mapWidth: number

The number of Tiles in the map along the x (horizontal) axis.

maxShielding

maxShielding: number

The maximum amount of shielding possible on a Tile.

maxTurns

maxTurns: number

The maximum number of turns before the game will automatically end.

maxUpgradeLevel

maxUpgradeLevel: number

The highest upgrade level allowed on a Miner.

miners

miners: Miner[]

Every Miner in the game.

orePrice

orePrice: number

The amount of money awarded when ore is dumped in the base and sold.

oreValue

oreValue: number

The amount of value awarded when ore is dumped in the base and sold.

players

players: Player[]

List of all the players in the game.

session

session: string

A unique identifier for the game instance that is being played.

shieldCost

shieldCost: number

The amount of building material required to shield a Tile.

shieldHealth

shieldHealth: number

The amount of mining power needed to remove one unit of shielding off a Tile.

spawnPrice

spawnPrice: number

The monetary price of spawning a Miner.

suffocationDamage

suffocationDamage: number

The amount of damage taken when suffocating inside a filled Tile.

suffocationWeightDamage

suffocationWeightDamage: number

The amount of extra damage taken for suffocating under a large amount of material.

supportCost

supportCost: number

The amount of building material required to build a support.

supportHealth

supportHealth: number

The amount of mining power needed to remove a support from a Tile.

tiles

tiles: Tile[]

All the tiles in the map, stored in Row-major order. Use x + y * mapWidth to access the correct index.

timeAddedPerTurn

timeAddedPerTurn: number

The amount of time (in nano-seconds) added after each player performs a turn.

upgradePrice

upgradePrice: number

The cost to upgrade a Miner.

upgrades

upgrades: Upgrade[]

Every Upgrade for a Miner in the game.

victoryAmount

victoryAmount: number

The amount of victory points (value) required to win.

Methods

getTileAt

  • getTileAt(x: number, y: number): Tile | undefined
  • Gets the Tile at a specified (x, y) position

    Parameters

    • x: number

      an integer between 0 and the mapWidth

    • y: number

      an integer between 0 and the mapHeight

    Returns Tile | undefined

    the Tile at (x, y) or null if out of bounds

Generated using TypeDoc