A game that lets players experience software development can be an excellent method of teaching coding concepts and programming features, like board room loops and conditional statement. Zachtronics Shenzhen I/O is one game that does this. It puts players in the shoes unhappy engineers who work for a boring company and have to build computer chips by hand. They are given increasingly complex circuits to design, starting by making lights flash according to a certain pattern.
The game’s interface is very similar to that found in browsers, and it is a great way to teach scripting. Screeps is another great example that incorporates JavaScript code with massively multi-player online gaming in order to create self-sustaining colonies. Both games do a great job of teaching the basics while slowly introducing new ones.