class Chat:

    #init the master class
    def __init__(self, master):
        self.master = master
        self.new_window()

    #builds and initializes the gui and bot
    def new_window(self):

        #bot init see ChatBot
        self.bot = ChatBot()

        #Gui initi see ChatGUI
        self.gui = ChatGUI(self.master, self.bot)

        #binds the enter button for the user input to the enter() method
        #when enter is pressed the enter method is called 
        button = self.gui.enterButton
        self.master.bind('<Return>', (lambda event: self.enter()))        
        #welcome msg from the system
        self.gui.updateChat("Welcome to the chatbot 4000 \n")
        self.gui.updateChatBot("Hello there! My name is " + self.bot.botName + ". How can I help you today?") 
        
    '''
    Connects both ChatGui and ChatBot when the user inputs some text in the gui,
    it is sent to the bot via the GUI. This is so that the user can use both the
    enter button on the gui and the keyboard
    
    '''
    def enter(self):
        self.gui.enter_command()