Responses
Pretty sure you did better than him, its not only about how well you can work on the project itself, there are things like comunication skills, being a pleasent person to work with, better sinergy with the people you working with and so on...if you were chosen that means you have more to offer overall. Dont let his ego make you think it wasnt supposed to be yours, cause it was.
This kinda reminds me of my ex. So we are in the same major and he thinks that he did better than me (well yeah, I admitted it). But somehow our professor always picked me instead of him to do some big projects. My ex was very upset he gave me a silent treatment for a few days.
Better to find a partner from different major guys lol