public Map(int width, int height, String name, String fileName, String hash, int[] heightMap,
			int[] buildable, int[] walkable) {
		size = new Position(width, height, PosType.BUILD);
		this.name = name;
		this.fileName = fileName;
		this.hash = hash;
		assert(heightMap != null && heightMap.length == size.getBX() * size.getBY());
		assert(buildable != null && buildable.length == size.getBX() * size.getBY());
		assert(walkable != null && walkable.length == size.getWX() * size.getWY());
		this.heightMap = heightMap;
		this.buildable = new boolean[buildable.length];
		this.walkable = new boolean[walkable.length];
		
		for (int i = 0; i < buildable.length; i++) {
			this.buildable[i] = (buildable[i] == 1);
		}
		
		for (int i = 0; i < walkable.length; i++) {
			this.walkable[i] = (walkable[i] == 1);
		}
		
		// Fill lowResWalkable for A* search
		lowResWalkable = new boolean[width * height];
		Arrays.fill(lowResWalkable, true);
		for (int wx = 0; wx < size.getWX(); wx++) {
			for (int wy = 0; wy < size.getWY(); wy++) {
				lowResWalkable[wx / 4 + width * (wy / 4)] &= isWalkable(
						new Position(wx, wy, PosType.WALK));
			}
		}
	}