@Override
	public double getHeuristicValue(AbstractState node,Game game) {
		if (node == null || !(node instanceof BoardState))
			throw new IllegalArgumentException("node is illegal");

		BoardState s = (BoardState) node;
		List<Point> towers = s.getTowerCoordinates();
		//check that node is legal
		for (Point coord : towers) 
			if (game.hasTower(coord)
					|| game.getBlockType(coord) != TILE_TYPE.GROUND)
				return -1;
			
		for (Tower t : game.getTowers())
			towers.add(t.getMapLocation());
		
		int towerLevelsSum = 0;
		for (Point towerCoord : towers) {
			if (!game.towerSeesPath(towerCoord))
				continue;
			towerLevelsSum += towerLevel(towerCoord,towers);
		}
		return towerLevelsSum;
	}