public void setTile(Tile tile, Tile selectedTile, Player tileOwner, Player selectedTileOwner, boolean clearUnit) {
		Unit displayedUnit = null;
		Player displayedUnitOwner = null;
		if (tile != null) {
			if (tile.hasUnit() || clearUnit) {
				displayedUnit = tile.getUnit();
				displayedUnitOwner = tileOwner;
			}
		}
		//EXTRA: Prevent the UnitPanel from redrawing itself twice on every single tile mouseover.
		if (selectedTile != null && displayedUnit == null) { //Hovered-over units take precedence over selected units.
			if (selectedTile.hasUnit()) {
				displayedUnit = selectedTile.getUnit();
				displayedUnitOwner = selectedTileOwner;
			}
		}
		if (displayedUnit == null) {
			unitPanel.setUnit(displayedUnit, displayedUnitOwner, actionListener, true);
		} else if (displayedUnit.isActive()) {
			unitPanel.setUnit(displayedUnit, displayedUnitOwner, actionListener, true);
		} else {
			unitPanel.setUnit(displayedUnit, displayedUnitOwner, actionListener, false);
		}
		
		terrainPanel.displayTerrainData(tile);
	}