The contract is void once liquor is made illegal as the contract itself is against public policy. One cannot recover damages for failure to perform a contract which is on its face illegal. By the same logic, gambling debts are not legally collectible in states which have statutes prohibiting gambling. Similarly, to use an extreme example, "hit" contracts are also not collectible legally. Any contract must be legal on its face for it to be collectible. B made a bad deal, apparently, and must now live with the consequences.