public boolean executeOrder(Sponsor sponsor) {
        if (!canExecuteOrder(sponsor)) return false;
        
        money += sponsor.getValue();
        setRenown(getRenown() + sponsor.getRenown());
        for (InventorySlot req: sponsor.getRequired()) {
            int count = req.getCount();
            for (InventorySlot slot: inventory) {
                if (slot.getItem() == req.getItem()) {
                    if (slot.getCount() > count) {
                        slot.setCount(slot.getCount() - count);
                        count = 0;
                        break;
                    } else {
                        count -= slot.getCount();
                        slot.setCount(0);
                    }
                }
            }
            if (count != 0) return false;
        }
        
        for (InventorySlot reward: sponsor.getRewards()) {
            int i = getMatchingInventorySlotIndex(reward.getItem());
            if (i == -1) return false;
            inventory[i].set(reward.getItem(), inventory[i].getCount()
                    + reward.getCount());
        }
        
        return true;
    }