A game that allows players to play with software development is an excellent method of teaching programming concepts and coding techniques, including loops and conditional statements. Zachtronics Shenzhen I/O is one game that accomplishes this. It puts players in the shoes unhappy engineers working for a dull firm and have to create computer chips by hand. The circuits they are asked to design get https://mrworkspace.nl/2010/05/11/the-news-from-software-development-world-game/ more difficult, starting with making the lights blink in a specific pattern.
The interface of the game looks very similar to developer tools found in browsers and also teaches scripting. Another great example is Screeps which blends JavaScript programming with massively multiplayer online gameplay to build self-sustaining colonies. Both games are excellent at teaching basic concepts, and slowly introducing new players.