export interface Input { readonly tiles: string[]; readonly layers: number[][][]; } export class MapData { public readonly tiles: string[]; public readonly layers: number[][][]; public readonly width: number; public readonly height: number; constructor(data: Input) { this.tiles = data.tiles; this.layers = data.layers; this.height = this.layers[0].length; this.width = this.layers[0][0].length; } }