Beispiel #1
1
 public void TellPunchline(IJoker joker, string punchLine)
 {
     joker.Ha();
     joker.Ha();
     joker.Hee();
     joker.Ho();
     joker.Ho();
     joker.Hee();
     joker.Hee();
 }
Beispiel #2
0
        public Executor(string joker)
        {
            //TODO: Use reflection and find all the classes that implement IJoker.
            //Built in list of jokers.
            var jokers = new List<IJoker>
            {
                new TRX2Joker.Core.Jokers.TextFile()
            };

            //Select the joker to use.
            this._joker = jokers.SingleOrDefault(x => x.Name == joker);
            if (this._joker == null)
                throw new ArgumentException("Unknown Joker", "joker");
        }
Beispiel #3
0
        public Executor(string joker)
        {
            //TODO: Use reflection and find all the classes that implement IJoker.
            //Built in list of jokers.
            var jokers = new List <IJoker>
            {
                new TRX2Joker.Core.Jokers.TextFile()
            };

            //Select the joker to use.
            this._joker = jokers.SingleOrDefault(x => x.Name == joker);
            if (this._joker == null)
            {
                throw new ArgumentException("Unknown Joker", "joker");
            }
        }
Beispiel #4
0
 public void TellFirstName(IJoker joker, string firstName)
 {
     joker.Respond(firstName + ", who?");
 }
Beispiel #5
0
 public void KnockKnock(IJoker joker)
 {
     joker.Respond("Who's there?");
 }