A game that lets players play with software development is an excellent way to teach coding concepts and programming, such as loops and https://mrworkspace.nl/2011/03/24/if-you-read-nothing-else-today-read-this-report-on-news-from-software-development-world/ conditional statements. Zachtronics Shenzhen I/O is a game that accomplishes this. It puts players in the shoes unhappy engineers who work for a boring company and have to build computer chips by hand. The circuits they are asked to design get more difficult beginning with making the lights flash in a specific pattern.
The interface of the game is similar to the one found in browsers, and it is a great way to teach scripting. Another great example is Screeps, which combines JavaScript programming and massively multiplayer online gaming to build self-sustaining colonies. Both games do a fantastic job of teaching basic concepts while slowly introducing new ones.