Пример #1
0
        public void Add(EGrid grid)
        {
            EHistoryItem item = new EHistoryItem(grid);

            _items.Insert(0, item);

            if (_bestItem.iteration < item.iteration)
            {
                _bestItem = item;
            }
            else if (_bestItem.iteration == item.iteration)
            {
                if (_bestItem.averageHealth < item.averageHealth)
                {
                    _bestItem = item;
                }
            }

            return;
        }
Пример #2
0
 public EHistory()
 {
     _items    = new List <EHistoryItem>();
     _bestItem = new EHistoryItem();
 }