If they actually found out about it, like Dusty said, there wouldn't be enough money involved most of the time to actually care. Even if they did care, there still wouldn't be enough money involved to do anything serious. They would probably just send a cease and desist letter if they actually cared enough to do anything about it. They're definitely not going to care about someone making a mario game as a coding project though. I would actually think they like people doing this (like someone said Nintendo does) because it's basically free advertisement.