UNPKG

matrix-map

Version:

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

8 lines (7 loc) 163 B
const createMap = function(){ this.map = new Map(); for (let i = 0; i < this.size; i++) { this.map.set(i+1, null) } } export default createMap