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.
LocalCostMatrix
Creates a new cost matrix within the WASM module. Optionally, a default value can be provided to initialize all cells in the matrix to that value.
Optional
Gets the cost of a given position in the cost matrix.
Sets the cost of a given position in the cost matrix.
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.