I'm currently developing a game for which I want to document my experience with online through my website. On the site, one of things I want to offer anyone who subscribes to my mailing list is access to my sourcecode repo via github. Basically, I want them to be able to play around with my source code for their own personal, educational use while learning through my site. I'm currently planning to release the source code under the Attribution-NonCommercial-NoDerivatives 4.0 International license which does not allow any modification or redistribution of my game without my permission.
My question is when dealing with software, at what point is it considered illegal to use a certain algorithm or solution to a particular software problem? Or a particular video game idea? For example, say someone on the comment section on my site offered a coding solution and/or an idea for my game for which I implement. Or say I used a coding solution from a blog I read and later the blogger recognized, from my github repo, his solution was used in my game. If either of these people decided to come back and sue me would they have any legal grounds to do so?