takeX.occupied < takeY.occupied ? takeX : takeY;
takeX.occupied <= takeY.occupied ? takeX : takeY;
    private RouteAndOccupiedCount findBestRoute(Layout layout, RawTile src, RawTile dst)     {	RawChip rawChip = layout.getRawChip();		LinkedList route = new LinkedList();	//if the source == dst just add the dest and return, the end of the recursion	if (src == dst) {	    route.add(dst);	    return new RouteAndOccupiedCount(route, 0);	}		int xDir = rawChip.getXDir(src, dst);	int yDir = rawChip.getYDir(src, dst);	//the route and the occupied count if we take X or Y	//initialize the occupied count to a large integer that can never be 	//obtained, in this case the total number of tiles +1	RouteAndOccupiedCount takeX = 	    new RouteAndOccupiedCount(new LinkedList(),				      rawChip.getTotalTiles() + 1);	RouteAndOccupiedCount takeY = 	    new RouteAndOccupiedCount(new LinkedList(),				      rawChip.getTotalTiles() + 1);		if (xDir != 0) {	    takeX = findBestRoute(layout, 				  rawChip.getTile(src.getX() + xDir, 						  src.getY()),				  dst);	}		//only try the y direction if the x direction has an occupied tile	//and we need to route in that direction	if (takeX.occupied > 0 && yDir != 0) {	    takeY = findBestRoute(layout,				  rawChip.getTile(src.getX(),						  src.getY() + yDir),				  dst);	}		//get the best route	RouteAndOccupiedCount bestRoute = 	    takeX.occupied < takeY.occupied ? takeX : takeY;		//if the source of this route is an occupied tile, then add one 	//to the count	if (layout.isAssigned(src))	    bestRoute.occupied++;		//add this src to the beginning of the route list	bestRoute.route.addFirst(src);	return bestRoute;    }