public void TellJoke(Random _rand, InterfaceHandler _interface) { char input = _interface.GetResponse(); if (input == 'Y' || input == 'y') { List <string> Joke = GetJoke(_rand); Joke.Add("Would you like to hear another joke?"); _interface.WriteTo(Joke); TellJoke(_rand, _interface); } }
static void Main(string[] args) { var Interface = new InterfaceHandler(); //Greet user Interface.Greeting(); //Get response from user char response = Interface.GetResponse(); //Respond to user, can use any subclass of Feeling var Handler = new ResponseHandler(response); Feeling Today = Handler.Today; Today.Respond(Interface); }