Esempio n. 1
0
        //Basic function for compiling messages to send to console,
        // need virtual keyword for polymorphism
        public virtual void Respond(InterfaceHandler _interface)
        {
            List <string> message = new List <string> {
                ReplyMessage, FarewellMessage
            };

            _interface.WriteTo(message);
            _interface.Exit();
        }
Esempio n. 2
0
        public override void Respond(InterfaceHandler _interface)
        {
            List <string> First = new List <string> {
                ReplyMessage, "Would a joke cheer you up?", "Press Y for Yes and N for No"
            }; _interface.WriteTo(First);
            Random rand = new Random();

            TellJoke(rand, _interface);
            List <string> Final = new List <string> {
                "That's a no to a joke.", FarewellMessage
            };

            _interface.WriteTo(Final);
            _interface.Exit();
        }