public void calculateAreas(int widthWindow, int heightWindow) {
		
		// for each cell of the map
		for(int j=0; j<this.heightMap; ++j) {
			for(int i=0; i<this.widthMap; ++i) {
			
				
				// we calculate only the hill cells (i.e. the cells that are not = -1)
				if(this.map[i][j] != -1) {
					// we look for the nearest base : at the beginning we don't know which one
					int nearestBase = -1;
					double smallerDistance = Double.MAX_VALUE;
					
					// we loop over all bases because we need to compare the distance separating all the bases
					int currentNumBase = -1;
					for(Base b:Game.getInstance().getBaseManager().getBases()) {
						
						// the influential bases are only the non-neutral
						if(b.getPlayer() != null) {
							++currentNumBase;
							
							// coordinates of the cell of the map in the window
							float xa = i*((float)widthWindow/this.widthMap);
							float ya = j*((float)heightWindow/this.heightMap);	
							// coordinates of the base
							float xb = b.getPosition().x;
							float yb = b.getPosition().y;
							// distance between the base and the cell
							double distance = Math.sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya));

							// if this base are nearest than the old one, we keep it in memory
							if(distance < smallerDistance) {
								nearestBase = currentNumBase;
								smallerDistance = distance;
							}
						}
					}
					
					// if we've found the nearest base, we can fill the cell !
					if(nearestBase != -1) {
						this.map[i][j] = nearestBase;
					}
				}
			}
		}
	}