Disclaimer: This code has been written for a 48 hour competition, the code is therefore extremely ugly and not representative of the true beauty of Nimrod. I'm sure you will find a lot of silly nested if's
in there. Feel free to clean up and make a pull request.