def gain(card, supply, to):
    """Gain a card from the supply, putting it in the 'to' location.

    Returns True iff successful.
    """
    if supply[card]:
        supply[card] -= 1
        to.append(card)
        return True
    else:
        return False