summaryrefslogtreecommitdiffstats
path: root/src/model/MapData.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/MapData.ts')
-rw-r--r--src/model/MapData.ts25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/model/MapData.ts b/src/model/MapData.ts
deleted file mode 100644
index c8db35c..0000000
--- a/src/model/MapData.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import {mapFromObject} from '../util';
-
-interface Input {
- readonly tiles: {[key: string]: string};
- readonly collision: string[];
- readonly layers: string[][][];
-}
-
-export default class MapData {
- public readonly tiles: Map<string, string>;
- public readonly collision: string[];
- public readonly layers: string[][][];
-
- public readonly width: number;
- public readonly height: number;
-
- constructor(data: Input) {
- this.tiles = mapFromObject(data.tiles);
- this.collision = data.collision;
- this.layers = data.layers;
-
- this.height = this.collision.length;
- this.width = this.collision[0].length;
- }
-}