This is pretty much how I imagined Notch's sadly abandoned space game project that had a programmable CPU as the heart of your ships. I hope someone takes over his torch on this, I'd love a fully fleshed out programmer's game. Imagine using such a thing in programming class as an introduction.