예제 #1
0
 public void GenerateTableLists(List <TableModel> tableInfo)
 {
     for (int id = 0; id < tableInfo.Count; id++)
     {
         Table newTable = new Table(id, tableInfo.ElementAt(id).Name, tableInfo.ElementAt(id).Size, tableInfo.ElementAt(id).IsKidTable);
         Tables.Add(newTable);
         if (newTable.IsKidTable)
         {
             ChildTables.Add(newTable);
         }
         for (int round = 0; round < NumRounds; round++)//change to 1 index at end?
         {
             //fill with blank lists
             newTable.Rounds.Add(new List <Person>());
         }
     }
     //sort so the biggest tables are last so ties and first picks will default to filling the bigger table first
     //because the big tables are hardest to fill and have the highest playedwith counts in general
     Tables.OrderBy(table => table.Size);
 }
 public CreateObjectCommand AddChild(string tableName)
 {
     ChildTables.Add(tableName);
     return(this);
 }