public boolean canExecuteOrder(Sponsor sponsor) {
        if (sponsor.value + money < 0) return false;
        Map<Item,Integer> itemCounts = new EnumMap<Item,Integer>(Item.class);
        for (Item item: Item.values())
            itemCounts.put(item, 0);
        for (InventorySlot slot: inventory) {
            if (slot.getItem() == null) continue;
            itemCounts.put(slot.getItem(), itemCounts.get(slot.getItem()) +
                    slot.getCount());
        }
        
        for (InventorySlot slot: sponsor.getRequired()) {
            if (itemCounts.get(slot.getItem()) < slot.getCount())
                return false;
        }
        
        for (InventorySlot reward: sponsor.getRewards()) {
            if (getMatchingInventorySlotIndex(reward.getItem()) == -1)
                return false;
        }
        
        return true;
    }