public int getType(int y, int x) {

		if(x >=0 && y >=0 && x < mapXRows && y < mapYRows){
			int rc = map[y][x];
			int r = rc / numTilesAcross;
			int c = rc % numTilesAcross;
			return tiles[r][c].getType();
		}
		return -1;
	}