public Cabin FindEmptyCabin() { var cabin = Cabins.FirstOrDefault(x => x.Element("indoors").Element("farmhand").Element("name").IsEmpty); if (cabin == null) { return(null); } return(new Cabin(cabin)); }
public XElement FindCabinByFarmhand(XElement farmhand) { return(Cabins.FirstOrDefault(x => x.Element("indoors").Element("farmhand").Element("name").Value == farmhand.Element("name").Value)); }