示例#1
0
 static bool isFloorComplete(Floor f)
 {
     return(isFloorValid(f) && f.Microchips.Count > 0 && f.Generators.Count > 0);
 }
示例#2
0
 static bool isFloorValid(Floor f)
 {
     return(f.Microchips.TrueForAll(c => f.Generators.Contains(c.Replace("-M", "-G"))) || f.Generators.Count == 0);
 }
示例#3
0
 static bool isFloorEmpty(Floor f)
 {
     return(f.Microchips.Count == 0 && f.Generators.Count == 0);
 }