コード例 #1
0
            public bool HasBingo()
            {
                for (int i = 0; i < Size; i++)
                {
                    bool row    = Lots.FindAll(n => n.Row == i).All(l => l.Marked == true);
                    bool column = Lots.FindAll(n => n.Column == i).All(l => l.Marked == true);
                    if (row || column)
                    {
                        return(true);
                    }
                }

                return(false);
            }
コード例 #2
0
 public void Mark(int number)
 {
     Lots.FindAll(n => n.Number == number).ForEach(n => n.Marked = true);
 }