Scared of the Peacock Revolution since 2006
Blog » Boring code
Every so often, I get bored of code. When this happens during competitions, I have to make it interesting. Last time this happened, I decided to add a dragon, COMP102 students and a worm hole. (I totally stole the idea for a dragon and COMP102 student fromĀ this, the wormhole came from the problem).
Here's an extract, cause the rest of the code is sadly lacking in amusingness.
#define eat push
#define hungry size
#define burn front
#define digest pop
...
queue<coord> dragon;
...
dragon.eat(c);
while(dragon.hungry()) {
c = dragon.burn();
dragon.digest();
...
dragon.eat(comp102student);
...
dragon.eat(comp102student);
...
dragon.eat(comp102student);
...
dragon.eat(comp102student);
...
dragon.eat(white_hole);
...
dragon.eat(black_hole);
...
Yay for #defines and STL whoring :)
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments
And it came to pass, as he went into the house of one of the chief Pharisees to eat bread on the sabbath day, that they watched him.
Powered by SilverStripe. Hosted by RimuHosting.
Unlease otherwise stated, all content is licenced under a Creative Commons Attribution-ShareAlike Licence.