a little game with lots of messy code