Empire of Code is a web game currently in beta that mixes strategy, tactics, and coding. It plays like a turn-based strategy game with elements of upgrading and building up your resources.
You start out with a tutorial to familiarize yourself with the interface, gameplay, and options.
The tutorial will walk you through building an army, gathering resources, attacking your enemy, and so on. The “strategies” for your army to follow is shown as code. In addition to building and upgrading your base, you can improve your resources by completing challenges presented by your buildings. These are little coding puzzles where you are given a mission and a framework of code to get the desired results.
The above challenge was simply solved with an if-else statement and as a result the resource production is enhanced.
If you would like to take this game for a spin, you can check it out at EmpireOfCode.com