It is interesting that due to agreement the purchaser cannot resell it, however, you do not mention if there was a contingency enforcing you not to resell it. As the customer, I would be pissed if you did. What you should have done is code his project then do your own with your new idea. Right now, your best bet is to offer him a cut of the sales.
Is this going to make you a little bit of money by reselling it or a lot? You may lose a few jobs by peddling it as rumors get passed around. Weigh out the benefits and if you have doubts about the ethics of what you are doing don't do it.
__________________
|