示例#1
0
 public void SortItemsBy(int how)
 {
     if (how == 1)
     {
         SortItemMethod sortMethodDelegate = new SortItemMethod(AscGreedyByProfitItemSort);
         SortItemList(sortMethodDelegate);
     }
     else if (how == 2)
     {
         Shuffle();
     }
     else if (how == 3)
     {
         SortItemMethod sortMethodDelegate = new SortItemMethod(DescWeightItemSort);
         SortItemList(sortMethodDelegate);
     }
     else
     {
         SortItemMethod sortMethodDelegate = new SortItemMethod(AscGreedyByRatioItemSort);
         SortItemList(sortMethodDelegate);
     }
 }
示例#2
0
 private void SortItemList(SortItemMethod itemSelection)
 {
     itemSelection();
 }