A game that allows players to play with software development is an excellent method to teach programming and coding concepts such as loops and conditional statements. Games that do this include Zachtronics’ Shenzhen I/O, which puts players in the shoes of dissatisfied engineers who work for a drab chip company and must build computer chips by hand. They are provided with increasingly challenging circuits to design, beginning with the making lights flash in a specific pattern.
The game’s interface looks very similar to tools for developers found in browsers and also teaches scripting. Another excellent example is Screeps which blends JavaScript programming with massively multiplayer online gameplay to create self-sustaining colonies. Both games do an excellent job of teaching basic concepts while slowly introducing new ones.
https://mrworkspace.nl/2015/08/03/techedge-2011-presentations-and-videos/