Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public XElement FindCabinByFarmhand(XElement farmhand)
 {
     return(Cabins.FirstOrDefault(x => x.Element("indoors").Element("farmhand").Element("name").Value == farmhand.Element("name").Value));
 }