A game that lets players to experience software development is a great method to teach programming and coding concepts such as loops and conditional statements. Games that accomplish this include Zachtronics Shenzhen I/O which puts players in the shoes of dissatisfied engineers working for an uninteresting chip maker and have to build computer chips by hand. The circuits they are asked to design become more difficult, starting with making the lights flash in a particular pattern.
The game’s interface is similar to the one you will find in browsers. Additionally, it is a great way to teach scripting. Screeps is a different excellent example, which blends JavaScript code with massively multi-player online gaming to build self sustaining colonies. Both games do a great job of teaching basic concepts while slowly introduction of new ones.