Exemplo n.º 1
1
 public void TellPunchline(IJoker joker, string punchLine)
 {
     joker.Ha();
     joker.Ha();
     joker.Hee();
     joker.Ho();
     joker.Ho();
     joker.Hee();
     joker.Hee();
 }
Exemplo n.º 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");
        }
Exemplo n.º 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");
            }
        }
Exemplo n.º 4
0
 public void TellFirstName(IJoker joker, string firstName)
 {
     joker.Respond(firstName + ", who?");
 }
Exemplo n.º 5
0
 public void KnockKnock(IJoker joker)
 {
     joker.Respond("Who's there?");
 }