UNPKG

matrix-map

Version:

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

12 lines (8 loc) 220 B
const getNorthEdge = function() { this.northEdge = new Set(); let edgeSize = Math.sqrt(this.size); for (let i = 0; i < edgeSize; i++) { this.northEdge.add(i+1); } } export default getNorthEdge