Пример #1
0
        public void Put()
        {
            if (!AmIHolding)
            {
                throw new Exception($"Мы ничего не держим!");
            }

            CurrentItem.Hide();
            CurrentItem = null;
        }
Пример #2
0
        private void SetCurrentItem(ScholarItem.Type item)
        {
            if (!_itemsIHave.Contains(item))
            {
                throw new Exception($"У нас нет {item}!");
            }

            if (AmIHolding)
            {
                throw new Exception($"Мы еще держим {CurrentItem}!");
            }

            CurrentItem = ScholarItem.Create(_scholar, item);
        }