created InputHandler class and moved input handling from TicTacToe to InputHandler