private void renderGrid(Grid grid) {
		this.fill(this.gridSpace, this.screenBackgroundColor);
		Tile[][] tiles = grid.getTiles();
		GridPoint selectedLocation = grid.getSelectedLocation();
		this.calculateGridOffset(grid, selectedLocation);
		Set<GridPoint> targetLocations = grid.getTargetTiles();
		AreaOfEffect areaOfEffect = grid.getCurrentAOE();
		for (int y = 0; y < grid.height; y++) {
			for (int x = 0; x < grid.width; x++) {
				Tile tile = tiles[y][x];
				GridPoint currentGridPoint = new GridPoint(x, y);
				Color color = tile.isImpassable() ? this.impassableTerrainColor : this.genericTerrainColor;
				if (targetLocations != null && targetLocations.contains(currentGridPoint)) {
					color = this.targetTileColor;
				}
				if (selectedLocation.matches(x, y)) {
					color = this.selectedTileColor;
				}
				if (areaOfEffect != null && areaOfEffect.contains(grid.getSelectedLocation(), currentGridPoint)) {
					color = this.aoeTileColor;
				}
				this.fill(this.getTileRectangle(x, y), color);
			}
		}
	}