Learning to code by writing games