diff --git a/src/lib/index.js b/src/lib/index.js index 436cb2a..37a3f55 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -1,6 +1,88 @@ console.log('import entrypoint lib') +const cos_60 = Math.cos(60 * Math.PI / 180) +const sin_60 = Math.sin(60 * Math.PI / 180) + +const TileType = { + LAND : 0, + WATER : 1 +} + +class TileGrid { + constructor(width = 100, height = 100) { + this.width = 100 + this.height = 100 + this.tiles = new Array(this.width * this.height) + for (let y=0; y