screeps-clockwork
    Preparing search index...

    Class ClockworkCostMatrix

    A wrapper around the LocalCostMatrix type from the Screeps API. Instances can be passed between WASM and JS as a pointer, using the methods to get and set values, rather than copying the entire matrix.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Gets the cost of a given position in the cost matrix.

      Parameters

      • x: number
      • y: number

      Returns number

    • Sets the cost of a given position in the cost matrix.

      Parameters

      • x: number
      • y: number
      • value: number

      Returns void