@2d-game-grid/square
Version:
A simple square grid made for games
15 lines (14 loc) • 409 B
JavaScript
import { Grid } from '@2d-game-grid/core';
import { SquareCell } from './SquareCell.js';
/**
* The grid contains all information about cells
*/
export class SquareGrid extends Grid {
constructor(options) {
super(options);
this.initialize((coordinate, value) => new SquareCell(this, coordinate, value));
}
initializeGrid(options) {
return new SquareGrid(options);
}
}