Hashes

1427

Hallooooweeeeen
Date : 31/10/17
Scribe : Speedbump
Hounds : 32     Dogs : 0
Recorded distance : 9.37 km
Recorded time : 85.97 min
Uphillness : 548.47 ft

In light of my (Anthony) current situation it was suggested that I should summarise the hash in code. So here it goes:


  1 #include
  2 #include
  3
  4 using namespace std;
  5
  6 class fancyDressException: public exception { };
  7
  8 class shoutout { 
  9     public:
 10     void shout(const string &name, const string &message) { 
 11         if (_last_message.compare(message)) { 
 12             cout << ": " << _last_message << endl << name;
 13             _last_message = message;
 14         }
 15         else { 
 16             cout << ", " << name;
 17         }
 18     };
 19     ~shoutout() { cout << ": " << _last_message << endl;};
 20
 21     private:
 22     string _last_message = "Oi!";
 23 };
 24
 25 class IHash { 
 26     public:
 27     virtual void gather() = 0;
 28     virtual void run() = 0;
 29     virtual void pub() = 0;
 30 };
 31
 32 class hasher: public IHash { 
 33     public:
 34     hasher(string name, shoutout &OnOn) : _name(name), _OnOn(OnOn) { 
 35         if (!name.compare("Andy") || !name.compare("Ken") || !name.compare("Mike"))
 36             throw fancyDressException();
 37     };
 38     virtual void gather() {/* Mill about doing nothing. */};
 39     virtual void run() {_OnOn.shout(_name, "Run round Common Wood, then Penn Wood, On on!");};
 40     virtual void pub() {_OnOn.shout(_name, "Drink beer, chat, eat cake and chips");};
 41
 42     protected:
 43     string _name;
 44     shoutout &_OnOn;
 45 };
46
 47 class hare: public hasher {
 48     public:
 49     hare(string name, shoutout &OnOn, int length) : hasher(name, OnOn), _length(length) {};
 50     void gather() {_OnOn.shout(_name, "There is a run of " + to_string( _length) + ", ish...");};
 51
 52     private:
 53     int _length;
 54 };
 55
 56 class GM: public hasher {
 57     public:
 58     GM(string name, shoutout &OnOn) : hasher(name, OnOn) {};
 59     void run() {_OnOn.shout(_name, "Follow behind, blobbing away");};
 60     void pub() {_OnOn.shout(_name, "Speech");};
 61 };
 62
 63
 64 int main(int argc, char *argv[])
 65 {
 66     list tick;
 67     class shoutout OnOn;
 68
 69     tick.push_back(new hare("Jo", OnOn, 3));
 70     tick.push_back(new hare("Glenn", OnOn, 5));
 71     for (const char *n : {"Anthony", "Sarah", "Alan", "Mike", "Judy", "MattR",
 72                           "MattW", "Aud", "Barney", "Mick", "Helen", "Aaron",
 73                           "Andy", "Livvy", "Jess", "Paul", "Ken", "..." }) {
 74         try {
 75             tick.push_back(new hasher(n, OnOn));
 76         }
 77         catch (fancyDressException &e) {
 78             tick.push_back(new hasher(string(n) + " \xE2\x98\xB9", OnOn));
 79         }
 80     }
 81     tick.push_back(new GM("Roger", OnOn));
 82
 83     for (IHash *h : tick) h->gather();
 84     for (IHash *h : tick) h->run();
 85     for (IHash *h : tick) h->pub();
 86
 87     return 0;
 88 }

This gives us the output:

: Oi!
Jo: There is a run of 3, ish...
Glenn: There is a run of 5, ish...
Jo, Glenn, Anthony, Sarah, Alan, Mike ☹, Judy, MattR, MattW, Aud, Barney, Mick, Helen, Aaron, Andy ☹, Livvy, Jess, Paul, Ken ☹, ...: Run round Common Wood, then Penn Wood, On on!
Roger: Follow behind, blobbing away
Jo, Glenn, Anthony, Sarah, Alan, Mike ☹, Judy, MattR, MattW, Aud, Barney, Mick, Helen, Aaron, Andy ☹, Livvy, Jess, Paul, Ken ☹, ...: Drink beer, chat, eat cake and chips
Roger: Speech

This feels like a fairly accurate summary of the hash to me! However, for those who are more interested in verbiage than C++.

The hash gathered in a dankly-lit car park, unveiling grotesque figures, all full of ghoulish behaviour. So the same as normal, to be honest. Jo set our expectations suitably: flat-ish, set on Sunday so there might be flour, if you’re lucky. Oh, and it's Glenn’s first outing as hare. Oh, and Glenn, don’t forget it looks nothing like the same at night in those woods (with an implied "compared to when we set it".)

1427_spookyOff we went and in all honesty you are not going to get a much better description than “Run round Common Wood, then Penn Wood, On on!”. We had gone round in Common Wood so many times that I didn’t even notice when we crossed the road into Penn Wood, we were just spiralling in the never-ending darkness of perpetual woods. Without wishing to take schadenfreude there were no notable mishaps. Glenn did get out the map on the long, but had it fully under control. There was still flour the majority of the time. Aaron even managed to avoid kicking out the booby-trapped check, neatly circled around a dog’s doings.

Back in the pub Roger thanks Jo and Glenn for a fantastic hash and a great selection of chips. He announces that we had a visitor from a long, long way away which was the reason why we had to come in fancy dress. We needed to make it a very special night for it was her birthday. Roger referred to her as the terribly blushing, not blushing bride, just blushing, Julia is 21. She came over specially to be with her relatives. At this point Mike spots cake and begins fighting his way for first, second, third… portions. Mike won over Julia and was allowed to eat cake. However, he did try to suggest she didn’t speak properly with a lack of vowels. Doesn’t he know that is not the way to win over a lady? Certainly not a way to get chocolate cake. Keep him in line Judy! Roger did not need any encouragement with trying to imitate the New Zealand accent.

Thanks for a great run Jo & Glenn! On on!

1427_bum_note
Now that's what I call a bum note!