Source code for my 'PiWars' entry