A game that allows players to play with software development is an excellent way to teach programming concepts and coding, such as https://mrworkspace.nl/2013/11/01/the-foolproof-news-from-software-development-world-strategy/ loops and conditional statements. Games that can do this include Zachtronics’ Shenzhen I/O, which puts players in the shoes of disaffected engineers working at a drab chip company and must design computer chips by hand. The circuits they’re required to create become more complicated beginning with making the lights flash in a particular pattern.
The game’s interface looks very similar to the developer tools found in browsers and also teaches scripting. Screeps is a different excellent example that is a game that combines JavaScript code with massively multi-player online gaming in order to create self-sustaining colonies. Both games do a great job of teaching basic concepts as well as slowly introduction of new ones.