summaryrefslogtreecommitdiffstats
path: root/src/model/data/map.ts
blob: d6fd835863688b97561585deb1c2f1b5f136ad4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
	}
}