JK Rowling, author of the Harry Potter books helped EA Games with the creation of rules and plot for the newest game. Chris Roberts, who oversaw the games development wanted to create games like Gobstones and Exploding Snap but had no rules, so they forwarded some to JK, which she approved. JK also helped the creators with a certain plot line in the game.
According to Chris:
She has written documents for us, explaining how certain things work, why you shouldn't do certain things that we're not supposed to say because they're secret.
We got this feedback from her saying, 'I really like the mission, but I don't think Neville would do that. I think it would be Dean Thomas. He's much more likely to do it.'
The article also discusses the creators joy at creating Hogwarts, meeting the actors from the movie, especially Rupert and you can also see a video of the team discussing the creation of the game.