Esempio n. 1
0
        internal (Tower, int) getWrongTower()
        {
            var groups        = SubTowers.GroupBy(c => c.getWeight());
            int correctWeight = groups.First(c => c.Count() > 1).Key;
            var wrongTower    = groups.First(c => c.Count() == 1).First();

            return(wrongTower, correctWeight);
        }
Esempio n. 2
0
 internal bool isBalanced()
 {
     return(SubTowers.GroupBy(c => c.getWeight()).Count() == 1);
 }