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