public Color getTileColor(int x, int y, int pixelSize){
		float r = 0, g = 0, b = 0, n = 0;
		for(int x2=x; x2<x+pixelSize; x2++){
			for(int y2=y; y2<y+pixelSize; y2++){
				if((x2 >= w) || (y2 > h)) break;
				n++;
				switch(level.fields[y][x]){
					case dest: b += 1f; break;
					case floor: r += 0.7f; g += 0.7f; b += 0.7f; break;
					case grass: g += 1f; break;
					case src: r += 1f; g += 0.3f; b += 0.3f; break;
					case wall: r += 0.4f; g += 0.4f; b += 0.4f; break;
				}
			}
		}
		return new Color(r/n, g/n, b/n);
	}