nylira-grid

Simple grid object.

Usage no npm install needed!

<script type="module">
  import nyliraGrid from 'https://cdn.skypack.dev/nylira-grid';
</script>

README

nylira-grid

A simple grid object

Install

npm i nylira-grid --save

Use

var Grid = require('nylira-grid')

var grid = new Grid()

console.log(grid)

// results in

{ height: 10,
  width: 10,
  cells: 
   [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
     [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ] }

License

MIT