Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Grid<V>

The 'Grid' is the class for manipulating grids.

Type parameters

  • V

Hierarchy

  • Grid

Index

Constructors

constructor

  • new Grid<V>(): Grid<V>
  • Type parameters

    • V

    Returns Grid<V>

Properties

Private map

map: Map<number, V> = ...

Methods

clear

  • clear(): void

delete

  • delete(position: Vector): void

entries

get

  • get(position: Vector): undefined | V
  • Returns the value of the given position.

    Parameters

    Returns undefined | V

    The value of the given position

getId

  • getId(position: Vector): number
  • Returns the id of the given position.

    Parameters

    Returns number

    The id of the given position

getPositionById

  • getPositionById(id: number): Vector
  • Returns the position of the given id.

    Parameters

    • id: number

    Returns Vector

    The position of the given id

keys

set

  • set(position: Vector, value: V): void
  • Sets the given value in the given position.

    Parameters

    Returns void

values

  • values(): V[]

Generated using TypeDoc