UNPKG

matrix-map

Version:

A class object for to aid in the creation of 2D grid games.

10 lines (8 loc) 193 B
const getWestNeighbor = function(id){ let westNeighbor = null; if(!this.westEdge.has(id)){ westNeighbor = id-1; } return westNeighbor; } export default getWestNeighbor