UNPKG

matrix-map

Version:

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

10 lines (8 loc) 193 B
const getEastNeighbor = function(id){ let eastNeighbor = null; if(!this.eastEdge.has(id)){ eastNeighbor = id+1; } return eastNeighbor; } export default getEastNeighbor