// Guess Game Bot // Pick a number and see if your number was the same one the computer picked using System; namespace ChatBot { class GuessGameBot : BasicBot { public override string HandleMessage(string message, string user) { if (state != "0") { string msg; if (state == message) msg = "Excellent! You got it."; else msg = "Sorry, you guessed wrong, the number was " + state; state = "0"; return msg; } else { state = User.RandNum() + ""; return "Hey, I'm thinking of a number between 1 and 10. Can you guess what it is?"; } } } }