using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Projekt
{
    [Serializable]
    public class Inventory : Item
    {
        Item item = new Item();
        List<Item> listitem = new List<Item>();
        
        public Inventory()
        {
            for (int i = 0; i < item.GetAllGenderNames().Length; i++)
            {
                listitem.Clear();
                invlist.Add(listitem);
                (invlist[i]).Add(item.DefaultItem());
            }
            
        }


        List<List<Item>> invlist = new List<List<Item>>();
        public List<List<Item>> Invlist
        {
            get { return invlist; }
            set { invlist = value; }
        }

        public void AddItem(Item item, int zahl)
        {
            (invlist[zahl]).Add(item);
        }

        public Item GetItem(int gender, int zahl)
        {
            return (invlist[gender])[zahl];
        }

        public List<Item> GetGenderItems(int gender)
        {
            return invlist[gender];
        }
        
        

    }
}
