export enum ItemTypes {
    box = 'box',
    egg = 'egg',
    gift = 'gift',
    gold = 'gold',
    money = 'money'
}

export const ItemTypesLit = [ItemTypes.box, ItemTypes.egg, ItemTypes.gift, ItemTypes.gold, ItemTypes.money]

export const randomItem = (currentlist: ItemTypes[]) => {
    const list = ItemTypesLit.filter(i => currentlist.indexOf(i) == -1);
    return list[Math.random() > 0.5 ? 0 : 1]
}