@tamb/gamegrid
    Preparing search index...

      @tamb/gamegrid

      Barrel entry documenting the @tamb/gamegrid public API.

      The GameGrid class is the default export. Custom grid events use IGameGridEventDetail / GameGridDOMEvent with string names from gridEventsEnum.

      import GameGrid, { cellTypeEnum, gridEventsEnum } from "@tamb/gamegrid";

      const grid = new GameGrid(
      {
      matrix: [[{ type: cellTypeEnum.OPEN }, { type: cellTypeEnum.OPEN }]],
      options: { wasdControls: true },
      },
      document.querySelector("#root")!,
      );

      grid.moveRight();
      window.addEventListener(gridEventsEnum.MOVE_LAND, () => {
      console.log(grid.getState().activeCoords);
      });
      GameGrid
      IGameGrid
      IConfig
      IOptions
      MiddlewareFn
      IDefaultState
      IState
      StatePatch
      INITIAL_STATE
      ICell
      ICellContext
      ICellRefresh
      IGameGridEventDetail
      IMoveEventDetail
      GameGridDOMEvent
      gameGridEventsEnum
      gridEventsEnum
      IRegionTile
      IZoomBounds
      IZoomOptions
      ZoomQuadrant
      IRefsObject
      IRow
      IRefs
      cellTypeEnum
      directionEnum
      keycodeEnum
      classesEnum
      directionClassEnum