He told his friend about the game. I don’t think he would have done so if he copied or felt he had “stolen” anything. If he remade the game with this own code and assets then he put a lot of work into it and he can be proud of that (and telling his friend shows that he was). Comparing the game, i do think the clone is better made / more polished. So he really like the game and made a better version of it. I don’t think that’s a bad thing. IP has to be respected (can’t just copy assets or code) but if that’s the case then anything goes and that’s a good thing, it gives us better games.
Think PalWorld, for example, Nintendo, one of the most copyright abusing companies in the world, doesn’t sue them and it’s arguably a better game than anything Nintendo has come up with recently (no new / modern / good / 3D Pokemon games).
Is this AI generated? I don’t think so because it is lacking nonsensical stuff but maybe AI is this good now??